connection with jdbc failed
Posted in 2003
Topics: Connectivity: ODBC / JDBC / .NET, Security, Permissions & Auditing, Internationalization & Character Sets
Can anybody help me with this problem: Trying to connect to an informix database on a unix database server from my windows 2000 computer, I get the exception : -> Encoding or code set not supported I used this command: con = DriverManager.getConnection("jdbc:informix-sqli://myUnixServerIP:1529/myData base:informixserver=myDbServer;user=myName;password=myPassword"); Adding a locale property (client_locale=de_de.88591) to the URL, I get another message -> unable to load locale categories What is wrong with the code above ?
"Frank" <frank.keidel@ops.de> writes:
> Can anybody help me with this problem:
>
> Trying to connect to an informix database on a unix database server from my
> windows 2000 computer, I get the exception :
>
> -> Encoding or code set not supported
You may see with dbaccess or some other way, the encoding of the database
with the statement:
select * from sysdbslocale
>
> I used this command:
>
> con =
> DriverManager.getConnection("jdbc:informix-sqli://myUnixServerIP:1529/myData
> base:informixserver=myDbServer;user=myName;password=myPassword");
>
> Adding a locale property (client_locale=de_de.88591) to the URL, I get
> another message
>
> -> unable to load locale categories
This may mean, that you don't have correct SET INFORMIXDIR=...
Check that you have the file %INFORMIXDIR%\\gls\\lc11\\de_de\\0333.lco!
>
> What is wrong with the code above ?
There seems nothing to be wrong with the code. I've worked successfully with
similar connect strings.
Frank <frank.keidel@ops.de> wrote: > Can anybody help me with this problem: > Trying to connect to an informix database on a unix database server from my > windows 2000 computer, I get the exception : > -> Encoding or code set not supported > I used this command: > con = > DriverManager.getConnection("jdbc:informix-sqli://myUnixServerIP:1529/myData > base:informixserver=myDbServer;user=myName;password=myPassword"); I was having problems getting JDBC to connect to my database also, but I was getting different errors than you. It turned out my problem was with the location of the database. Here is the connection string I'm using connecting from Linux to a Unix database server. jdbc:informix-sqli://myhost:1525//path/mydb:informixserver=myhost;user= <username>;password=<password> By default, the Informix JDBC Driver looks in your home directory for the database so if the database is not located there make sure to specify the path to the db like this //path/mydb.