Problem with simple SELECT over ODBC

From: "Werner Kuhnle" <wek(at)kuhnle(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Problem with simple SELECT over ODBC
Date: 2010-09-03 09:00:45
Message-ID: DIIE.0000067D0001DB25@kuhnle.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hello,

I am completely new to PostgreSQL and wanted to evaluate PostgreSQL as a substitute for MS SQL.
Therefore I installed PG 9 RC and ODBC driver 8.04.02 (ANSI)
The program (EXE) calling the ODBC driver (Windows 32bit written in VC++) is using ANSI strings, not Unicode.

When I try the following simple SELECT :

SELECT Kurzzeichen,Name_Feld,EURO_Umr_Faktor,NKStellen,RowTimestamp,RowUserID,RowDDMFields,RowID FROM Waehrungen ORDER BY Kurzzeichen

from within pgAdminIII then it works well.

When I use exactly the same query with MS SQL and the SQL Server Native Client 10.0 ODBC Driver
it also works well.

But when exactly the same SELECT is issued to PG over the PG ODBC driver then I get :

SQLRetcode=-1
SqlState=42601, NativeError=7, MessageText=ERROR; syntax error at »,«;

Playing around some time with ENCODING=WIN1252 instead of UTF-8 and trying the UNICODE odbc driver instead of the ANSI driver gives the following results:

With the UNICODE driver the message does not occur, but the data returned is completely corrupted.

With ENCODING=WIN1252 the message is slightly different:
SQLRetcode=-1
SqlState=42601, NativeError=7, MessageText=ERROR; syntax error at »,«;

What's wrong here ?

Thanks in advance for any help/hint.

Greetings

Werner

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Tom Lane 2010-09-03 14:35:56 Re: Problem with simple SELECT over ODBC
Previous Message Craig Ringer 2010-08-24 02:09:09 Re: pgsqlodbc utf8 windows?