client encoding mismatch

--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,<div><br></div><div>I am running Postgre server in Windows platform.=
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.</div><di=
v>
<br></div><div>To test the application I have written a small Java program.=
When I execute the program I get =A0below mentioned error</div><div><br></=
div><div><div>SQLException: SQLState(22003) vendor code(214)</div><div>java=
..sql.SQLException: [unixODBC]client encoding mismatch</div>
<div>=A0=A0 =A0 =A0 =A0at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdb=
c.java:6958)</div><div>=A0=A0 =A0 =A0 =A0at sun.jdbc.odbc.JdbcOdbc.standard=
Error(JdbcOdbc.java:7115)</div><div>=A0=A0 =A0 =A0 =A0at sun.jdbc.odbc.Jdbc=
Odbc.SQLDriverConnect(JdbcOdbc.java:3074)</div>
<div><br></div><div><br></div><div>Java Program:</div><div>----------------=
-------------------------------------</div><div><span class=3D"Apple-tab-sp=
an" style=3D"white-space:pre"> </span>DriverManager.setLogWriter(new PrintW=
riter(System.out));<span class=3D"Apple-tab-span" style=3D"white-space:pre"=
> </span></div>
<div><span class=3D"Apple-tab-span" style=3D"white-space:pre"> </span>Class=
..forName("sun.jdbc.odbc.JdbcOdbcDriver");</div><div><span class=
=3D"Apple-tab-span" style=3D"white-space:pre"> </span>Connection con =3D Dr=
iverManager.getConnection (=A0"jdbc:odbc:postgres", "postgre=
s", "demopswd");=A0</div>
<div><br></div><div>odbc.ini</div><div>------------------------------------=
-----------</div><div>[ODBC Data Sources]<br></div><div>postgres =3D Postgr=
eSQL Test<br></div><div><br></div><div>[postgres]<br></div><div><div>Driver=
=3D/usr/lib/psqlodbc.so</div>
<div>Description=3DPostgreSQL DSN</div><div>DSN=3Dpostgres</div><div><div>S=
ervername=3D192.43.53.64</div><div>Username=3Dpostgres</div><div>Database=
=3Dpostgres</div><div>ReadOnly=3DNo</div><div>Servertype=3Dpostgres</div><d=
iv>Port=3D5432</div>
<div>FetchBufferSize=3D99</div><div>ReadOnly=3Dno</div><div>Trace=3D1</div>=
<div>TraceFile=3D/home/oralsh/odbc.trace</div><div>Debug=3D1</div><div>Debu=
gFile=3D/home/oralsh/odbc.debug</div><div>CommLog=3D1</div><div><br></div><=
div><div>[Default]</div>
<div>Driver =3D /usr/lib/libodbc.so</div><div><br></div><div>odbcinst.ini<b=
r></div><div>-----------------------------------</div><div><div>[PostgreSQL=
]</div><div>Description<span class=3D"Apple-tab-span" style=3D"white-space:=
pre"> </span>=3D ODBC for PostgreSQL</div>
<div>Driver<span class=3D"Apple-tab-span" style=3D"white-space:pre"> </spa=
n>=3D /usr/lib/libodbcpsql.so</div><div>Setup<span class=3D"Apple-tab-span"=
style=3D"white-space:pre"> </span>=3D /usr/lib/libodbcpsqlS.so</div><div>=
FileUsage<span class=3D"Apple-tab-span" style=3D"white-space:pre"> </span>=
=3D 1</div>
</div></div></div></div><div><span class=3D"Apple-tab-span" style=3D"white-=
space:pre"> </span></div><div>I even tried to change encoding by running &=
quot;alter user postgres SET client_encoding to UNICODE;" but still I =
get the same error</div>
<div><br></div><div>I dont know what is the mistake I have done. I request =
you please help me to resolve the issue</div><div><br></div>-- <br>regards<=
br>Prashantha K P<br>
</div>

--0016e644cd9abc983e0469a01418--
prashanth k p [ Mo, 11 Mai 2009 12:02 ] [ ID #2000786 ]

Re: client encoding mismatch

--0016362836892666330469a1b044
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hi All,
I could resolve the issue by updating "Driver=/usr/lib/psqlodbc.so"
to"Driver=/usr/local/lib/psqlodbcw.so"

Thanks. I hope this would help other people also

--
regards
Prashantha K P


On Mon, May 11, 2009 at 3:32 PM, prashanth k p <konkodi210 [at] gmail.com> wrote:

> 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
>

--0016362836892666330469a1b044
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi All,<div><br></div><div>I could resolve the issue by updating <span clas=
s=3D"Apple-style-span" style=3D"font-weight: bold;">"Driver=3D/usr/lib=
/psqlodbc.so"</span> to<span class=3D"Apple-style-span" style=3D"font-=
weight: bold;"> "Driver=3D/usr/local/lib/psqlodbcw.so"</span></di=
v>
<div><br></div><div>Thanks. I hope this would help other people also</div><=
div><br></div><div>--=A0<br>regards<br>Prashantha K P<br></div><div><br><br=
><div class=3D"gmail_quote">On Mon, May 11, 2009 at 3:32 PM, prashanth k p =
<span dir=3D"ltr"><<a href=3D"mailto:konkodi210 [at] gmail.com">konkodi210 [at] gm=
ail.com</a>></span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;">Hi All,<div><br></div><div>I am running Pos=
tgre server in Windows platform. I have installed=A0psqlodbc-08.03.0400 odb=
c driver and=A0libiodbc-3.52.6 driver for connecting Postgre database form =
Red Hat Linux platform.</div>
<div>
<br></div><div>To test the application I have written a small Java program.=
When I execute the program I get =A0below mentioned error</div><div><br></=
div><div><div>SQLException: SQLState(22003) vendor code(214)</div><div>java=
..sql.SQLException: [unixODBC]client encoding mismatch</div>

<div>=A0=A0 =A0 =A0 =A0at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdb=
c.java:6958)</div><div>=A0=A0 =A0 =A0 =A0at sun.jdbc.odbc.JdbcOdbc.standard=
Error(JdbcOdbc.java:7115)</div><div>=A0=A0 =A0 =A0 =A0at sun.jdbc.odbc.Jdbc=
Odbc.SQLDriverConnect(JdbcOdbc.java:3074)</div>

<div><br></div><div><br></div><div>Java Program:</div><div>----------------=
-------------------------------------</div><div><span style=3D"white-space:=
pre"> </span>DriverManager.setLogWriter(new PrintWriter(System.out));<span =
style=3D"white-space:pre"> </span></div>

<div><span style=3D"white-space:pre"> </span>Class.forName("sun.jdbc.o=
dbc.JdbcOdbcDriver");</div><div><span style=3D"white-space:pre"> </spa=
n>Connection con =3D DriverManager.getConnection (=A0"jdbc:odbc:postgr=
es", "postgres", "demopswd");=A0</div>

<div><br></div><div>odbc.ini</div><div>------------------------------------=
-----------</div><div>[ODBC Data Sources]<br></div><div>postgres =3D Postgr=
eSQL Test<br></div><div><br></div><div>[postgres]<br></div><div><div>Driver=
=3D/usr/lib/psqlodbc.so</div>

<div>Description=3DPostgreSQL DSN</div><div>DSN=3Dpostgres</div><div><div>S=
ervername=3D192.43.53.64</div><div>Username=3Dpostgres</div><div>Database=
=3Dpostgres</div><div>ReadOnly=3DNo</div><div>Servertype=3Dpostgres</div><d=
iv>Port=3D5432</div>

<div>FetchBufferSize=3D99</div><div>ReadOnly=3Dno</div><div>Trace=3D1</div>=
<div>TraceFile=3D/home/oralsh/odbc.trace</div><div>Debug=3D1</div><div>Debu=
gFile=3D/home/oralsh/odbc.debug</div><div>CommLog=3D1</div><div><br></div><=
div><div>
[Default]</div>
<div>Driver =3D /usr/lib/libodbc.so</div><div><br></div><div>odbcinst.ini<b=
r></div><div>-----------------------------------</div><div><div>[PostgreSQL=
]</div><div>Description<span style=3D"white-space:pre"> </span>=3D ODBC for=
PostgreSQL</div>

<div>Driver<span style=3D"white-space:pre"> </span>=3D /usr/lib/libodbcpsq=
l.so</div><div>Setup<span style=3D"white-space:pre"> </span>=3D /usr/lib/l=
ibodbcpsqlS.so</div><div>FileUsage<span style=3D"white-space:pre"> </span>=
=3D 1</div>

</div></div></div></div><div><span style=3D"white-space:pre"> </span></div=
><div>I even tried to change encoding by running "alter user postgres =
SET client_encoding to UNICODE;" but still I get the same error</div>

<div><br></div><div>I dont know what is the mistake I have done. I request =
you please help me to resolve the issue</div><div><br></div>-- <br>regards<=
br>Prashantha K P<br>
</div>
</blockquote></div><br><br clear=3D"all"><br><br>
</div>

--0016362836892666330469a1b044--
prashanth k p [ Mo, 11 Mai 2009 13:57 ] [ ID #2000787 ]
Datenbanken » gmane.comp.db.postgresql.odbc » client encoding mismatch

Vorheriges Thema: psqlodbc driver returning empty string
Nächstes Thema: psqlodbc driver issue