client encoding mismatch
am 11.05.2009 12:02:50 von prashanth k p--0016e644cd9abc983e0469a01418
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Hi All,
I am running Postgre server in Windows platform. I have
installed psqlodbc-08.03.0400 odbc driver and libiodbc-3.52.6 driver for
connecting Postgre database form Red Hat Linux platform.
To test the application I have written a small Java program. When I execute
the program I get below mentioned error
SQLException: SQLState(22003) vendor code(214)
java.sql.SQLException: [unixODBC]client encoding mismatch
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958 )
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3074)
Java Program:
-----------------------------------------------------
DriverManager.setLogWriter(new PrintWriter(System.out));
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection ( "jdbc:odbc:postgres",
"postgres", "demopswd");
odbc.ini
-----------------------------------------------
[ODBC Data Sources]
postgres = PostgreSQL Test
[postgres]
Driver=/usr/lib/psqlodbc.so
Description=PostgreSQL DSN
DSN=postgres
Servername=192.43.53.64
Username=postgres
Database=postgres
ReadOnly=No
Servertype=postgres
Port=5432
FetchBufferSize=99
ReadOnly=no
Trace=1
TraceFile=/home/oralsh/odbc.trace
Debug=1
DebugFile=/home/oralsh/odbc.debug
CommLog=1
[Default]
Driver = /usr/lib/libodbc.so
odbcinst.ini
-----------------------------------
[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/libodbcpsql.so
Setup = /usr/lib/libodbcpsqlS.so
FileUsage = 1
I even tried to change encoding by running "alter user postgres SET
client_encoding to UNICODE;" but still I get the same error
I dont know what is the mistake I have done. I request you please help me to
resolve the issue
--
regards
Prashantha K P
--0016e644cd9abc983e0469a01418
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hi All,
I have installed=A0psqlodbc-08.03.0400 odbc driver and=A0libiodbc-3.52.6 d=
river for connecting Postgre database form Red Hat Linux platform.
When I execute the program I get =A0below mentioned error
=
div>
..sql.SQLException: [unixODBC]client encoding mismatch
c.java:6958)
Error(JdbcOdbc.java:7115)
Odbc.SQLDriverConnect(JdbcOdbc.java:3074)
-------------------------------------
riter(System.out)); >
..forName("sun.jdbc.odbc.JdbcOdbcDriver");
iverManager.getConnection (=A0"jdbc:odbc:postgres", "postgre=
s", "demopswd");=A0
-----------
eSQL Test
=3D/usr/lib/psqlodbc.so
ervername=3D192.43.53.64
=3Dpostgres
gFile=3D/home/oralsh/odbc.debug
div>
]
FileUsage =
=3D 1
quot;alter user postgres SET client_encoding to UNICODE;" but still I =
get the same error
you please help me to resolve the issue
regards<=
br>Prashantha K P
--0016e644cd9abc983e0469a01418--