JDBC connection to Informix-Online 7.2
Posted in 1999
Topics: Connectivity: ODBC / JDBC / .NET, Security, Permissions & Auditing, Java & JDBC Development, Internationalization & Character Sets
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 _______________________________________________________________________
Set DB_LOCALE to something like "cs_cz.1250" (language,country,codepage) or maybe "de_de.8859-1". DB_LOCALE must be same as the base is created in. bye Ivan Bolcina Lars Sitzmann <sitzmann@OFFIS.uni-oldenburg.de> wrote in message news:3797359F.26C646F1@OFFIS.uni-oldenburg.de... > 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="+Informi xPass+ > ";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 > _______________________________________________________________________