Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 7ACA363267E for ; Fri, 3 Sep 2010 19:00:57 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 40135-03 for ; Fri, 3 Sep 2010 22:00:49 +0000 (UTC) X-Greylist: delayed 00:06:57.140064 by SQLgrey-1.7.6 Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by mail.postgresql.org (Postfix) with SMTP id 94CAA6310AC for ; Fri, 3 Sep 2010 19:00:49 -0300 (ADT) Received: (qmail 9593 invoked by uid 512); 3 Sep 2010 21:53:47 -0000 X-Authentication: inoue was authenticated by sd.tpf.co.jp at 3 Sep 2010 21:53:47 -0000 Received: from unknown (HELO ?192.168.24.51?) (183.76.21.68) by sd.tpf.co.jp with SMTP; 3 Sep 2010 21:53:47 -0000 Message-ID: <4C816E45.1070504@tpf.co.jp> Date: Sat, 04 Sep 2010 06:53:09 +0900 From: Hiroshi Inoue User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; ja; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: Werner Kuhnle CC: pgsql-odbc@postgresql.org Subject: Re: Problem with simple SELECT over ODBC References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.158 tagged_above=-10 required=5 tests=BAYES_05=-0.5, DNS_FROM_RFC_BOGUSMX=1.668, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: * X-Archive-Number: 201009/5 X-Sequence-Number: 10415 (2010/09/03 18:00), Werner Kuhnle wrote: > > 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 »,«; Could you send me directly the Mylog output? > 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. What do you mean by "corrupted"? The Unicode driver returns the results in UTF16 strings. regards, Hiroshi Inoue