Skip site navigation (1) Skip section navigation (2)

Re: client encoding mismatch

From: prashanth k p <konkodi210(at)gmail(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Re: client encoding mismatch
Date: 2009-05-11 11:57:52
Message-ID: 69d075ef0905110457w1690d2ane3788e77874be47a@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-odbc
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(dot)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
>

In response to

pgsql-odbc by date

Next:From: Zahid KhanDate: 2009-05-14 13:44:40
Subject: psqlodbc driver returning empty string
Previous:From: prashanth k pDate: 2009-05-11 10:02:50
Subject: client encoding mismatch

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group