Re: JDBC connection to Informix-Online 7.2
Posted in 1999
Topics: Connectivity: ODBC / JDBC / .NET, Security, Permissions & Auditing, Java & JDBC Development, Internationalization & Character Sets
Hi, I hope you do have the 1.4x or 2.x JDBC driver. In this case you just have to specify the correct codeset while setting your DB_LOCALE and CLIENT_LOCALE parameters. i.e. for Russian it will be ru_ru.PC866. So just add to your "de_de" string the codeset code. Best Regards, Octav On Thu, Jul 22, 1999 at 05:15:43PM +0200, Lars Sitzmann wrote: > Hello, > I have following problem trying to establish a connection > to an Informix-Online server via JDBC (from a servlet). > Any call to DriverManager.getConnection() yields to following > error: "java.sql.SQLException: Locale not supported". > > I tried to set DB_LOCALE and CLIENT_LOCALE to different values, but > with the same result. > > Can anyone help? > > code-fragment: > --------------------------------------------------- > try{ > Class.forName("com.informix.jdbc.IfxDriver"); > }catch(Exception e){ > getServletContext().log(e,"Fehler beim Erzeugen der > InformixKlasse") > } > String ServerName = "xxx.xxx.xxx.xxx"; > String ServerPort = "1533"; > String InformixServer = "internet"; > String InformixUser = "informix"; > String InformixPass = "XXXX"; > String MetaDatenName = "infosys"; > > String URL1 = "jdbc:informix-sqli://" > +ServerName+":"+ServerPort+"/"; > String URL2 = > ":INFORMIXSERVER="+InformixServer+";user="+InformixUser+";password="+InformixPass+ > ";DB_LOCALE=de_de"; > String URL=""; > try{ > URL = URL1+MetaDatenName+URL2; > getServletContext().log(URL); > MetaDaten = DriverManager.getConnection(URL); > }catch(Exception e){ > getServletContext().log(e,"Fehler beim Aufbauen der Verbindung"); > } > -- > _______________________________________________________________________ > Lars Sitzmann phone: +49 441- 9722-222 > OFFIS fax: -202 > Escherweg 2 sekr.: -101 > D-26121 Oldenburg > Germany > _______________________________________________________________________ > mailto:sitzmann@offis.uni-oldenburg.de > WWW: http://www.offis.uni-oldenburg.de > _______________________________________________________________________ -- Octav Chiriac Phone: (373) 2 22 99 67 NetInfo S.R.L. Fax: (373) 2 21 36 59 Chisinau (373) 2 22 84 88 Moldova, Republic of mailto:com@netinfo-moldova.com
Octav Chiriac wrote: > > Hi, > > I hope you do have the 1.4x or 2.x JDBC driver. Hello, yes, I have version 1.4 of the JDBC driver. When I set the codeset-string to different values, the error messages vary between. "Unable to load locale categories" (CLIENT_LOCALE=de_de.57372 (unicode)) "Code sets of the locale categories are not the same" (CLIENT_LOCALE=de_de.364 (ASCI)) "Locale not supported" (CLIENT_LOCALE=de_de.819 (iso 8859-1)) But I still can't get a connection to my database.