Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id AFB976329C0 for ; Fri, 3 Sep 2010 06:00:56 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 92405-01 for ; Fri, 3 Sep 2010 09:00:48 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail08a.verio.de (mail08a.verio.de [213.198.55.73]) by mail.postgresql.org (Postfix) with ESMTP id E3AA96329B6 for ; Fri, 3 Sep 2010 06:00:47 -0300 (ADT) Received: from mx49.stngva01.us.mxservers.net (204.202.242.78) by mail08a.verio.de (RS ver 1.0.95vs) with SMTP id 3-0327094443 for ; Fri, 3 Sep 2010 11:00:44 +0200 (CEST) Received: from unknown [213.198.55.139] (EHLO mmm805.verio.de) by va1-mx49.stngva01.us.mxservers.net (mxl_mta-3.1.0-05) with ESMTP id c39b08c4.733989792.916524.00-002.va1-mx49.stngva01.us.mxservers.net (envelope-from ); Fri, 03 Sep 2010 05:00:44 -0400 (EDT) Received: (qmail 95345 invoked from network); 3 Sep 2010 09:00:42 -0000 Received: from unknown (HELO 172.16.1.24) (109.193.115.141) by with SMTP; 3 Sep 2010 09:00:42 -0000 From: "Werner Kuhnle" Subject: Problem with simple SELECT over ODBC To: pgsql-odbc@postgresql.org Date: Fri, 3 Sep 2010 09:00:45 +0000 X-Priority: 3 (Normal) Importance: normal X-Mailer: David.fx by Tobit.Software, Germany (0299.4549454B4E4A50484D4D), Mime Converter 101.20 X-David-Sym: 0 X-David-Flags: 33554432 Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_000_0001DB25.4C80D55D" X-Spam: [F=0.2000000000; S=0.200(2010073001); MH=0.500(2010090304)] X-MAIL-FROM: X-SOURCE-IP: [213.198.55.139] X-Loop-Detect: 1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201009/1 X-Sequence-Number: 10411 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_0001DB25.4C80D55D Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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,RowD= DMFields,RowID FROM Waehrungen ORDER BY Kurzzeichen =20 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=3D-1 SqlState=3D42601, NativeError=3D7, MessageText=3DERROR; syntax error at = =BB,=AB; =20 Playing around some time with ENCODING=3DWIN1252 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=3DWIN1252 the message is slightly different: SQLRetcode=3D-1 SqlState=3D42601, NativeError=3D7, MessageText=3DERROR; syntax error at = =C2=BB,=C2=AB; =20 What's wrong here ? Thanks in advance for any help/hint. Greetings Werner ------_=_NextPart_000_0001DB25.4C80D55D Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello,
 
I am completely new to PostgreSQL and wanted to = evaluate=20 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=20 VC++) is using ANSI strings, not Unicode.
 
When I try the following simple SELECT :
 
SELECT=20 = Kurzzeichen,Name_Feld,EURO_Umr_Faktor,NKStellen,RowTimestamp,RowUserID,RowD= DMFields,RowID=20 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=20 Native Client 10.0 ODBC Driver
it also works well.
 
But when exactly the same SELECT is issued to PG over the PG = ODBC=20 driver then I get :

SQLRetcode=3D-1
SqlState=3D42601, NativeError=3D7,=20 MessageText=3DERROR; syntax error at =BB,=AB;
 
Playing around some time with ENCODING=3DWIN1252 instead of = UTF-8 and=20 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=20 returned is completely corrupted.
 
With ENCODING=3DWIN1252 the message is slightly = different:
SQLRetcode=3D-1
SqlState=3D42601, NativeError=3D7, = MessageText=3DERROR;=20 syntax error at =C2=BB,=C2=AB;
 
What's wrong here ?
 
Thanks in advance for any help/hint.
 
Greetings
 
Werner
=
 

 
------_=_NextPart_000_0001DB25.4C80D55D--