Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 99B40633854 for ; Fri, 7 May 2010 11:03:45 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 21104-08 for ; Fri, 7 May 2010 14:03:36 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158]) by mail.postgresql.org (Postfix) with ESMTP id 00EDC632337 for ; Fri, 7 May 2010 11:03:37 -0300 (ADT) Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1OAO9Q-0001wU-Cw for pgsql-odbc@postgresql.org; Fri, 07 May 2010 07:03:36 -0700 Message-ID: <28486416.post@talk.nabble.com> Date: Fri, 7 May 2010 07:03:36 -0700 (PDT) From: Luciane To: pgsql-odbc@postgresql.org Subject: ODBC Numeric field issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: Luciane@copel.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/8 X-Sequence-Number: 10255 Hi everyone, I'm trying to access postgres using a ODBC Driver on a Linux system RedHat, but I'm getting errors with numeric fields, it works only with one numeric field. Another erro is that it is inserting a NULL record as well. Below is my ODBC configuration and extracts from the erros on the debug file. I've tried different versions of ODBC Drivers with no success. If any one more experient could help me I'll be very happy. Actually I don't know what to do anymore. Thanks in advance. Luciane ------> Odbc Configuration .odbc.ini [PostG] #Driver=3D/usr/lib/libodbcpsql.so.2 #Driver=3D/produtos/unixODBC-2.2.14/Drivers/Postgre7.1/.libs/libodbcpsql.so #Driver=3D/produtos/unixODBC-2.2.10/Drivers/Postgre7.1/.libs/libodbcpsql.so #Driver=3D/produtos/unixODBC-2.2.12/Drivers/Postgre7.1/.libs/libodbcpsql.so #Driver=3D/produtos/unixODBC-2.2.13/Drivers/Postgre7.1/.libs/libodbcpsql.so Driver=3D/produtos/unixODBC-2.3.0/Drivers/Postgre7.1/.libs/libodbcpsql.so.2 #Driver=3D/usr/lib/psqlodbcw.so Description=3Ddrive postgres odbc ServerPort=3D10.4.3.21:5432 Servername=3Dpgs1dsv Database=3Dpgs1dsv sername=3Dc_gco Password=3Dinicio ReadOnly=3Dno Protocol=3D7.4 RowVersioning=3DNo ShowSystemTables=3DNo ShowOidColumn=3DNo FakeOidIndex=3DNo Debug=3D1 DebugFile=3D/tmp/postgII.out Trace=3Dyes TraceFile=3D/tmp/ODBCTrace.log UseServerSidePrepare=3D1 DisallowPremature=3D1 #Parse=3D1 ------> Debug - inserting NULL Record SQLExecute: copying statement params: trans_status=3D1, len=3D66, stmt=3D'I= NSERT INTO "teste_carga"("s1", "i1", "n1", "n2") VALUES (?,?,?,?)' stmt_with_params =3D 'INSERT INTO "teste_carga"("s1", "i1", "n1", "n2") VALUES (NULL,NULL,NULL,NULL)' it's NOT a select statement: stmt=3D140373784 send_query(): conn=3D140316008, query=3D'INSERT INTO "teste_carga"("s1", "i= 1", "n1", "n2") VALUES (NULL,NULL,NULL,NULL)' send_query: done sending query ------> Debug - Issue on the second numeric field SQLExecute: copying statement params: trans_status=3D1, len=3D66, stmt=3D'I= NSERT INTO "teste_carga"("s1", "i1", "n1", "n2") VALUES (?,?,?,?)' copy_statement_with_params: from(fcType)=3D1, to(fSqlType)=3D5 copy_statement_with_params: from(fcType)=3D1, to(fSqlType)=3D4 copy_statement_with_params: from(fcType)=3D1, to(fSqlType)=3D2 copy_statement_with_params: from(fcType)=3D1, to(fSqlType)=3D2 stmt_with_params =3D 'INSERT INTO "teste_carga"("s1", "i1", "n1", "n2") VALUES (00001,0000000001,'0000000001") VALUES '::numeric,'0000000110H=C3=A9'::numeric)' it's NOT a select statement: stmt=3D140373784 send_query(): conn=3D140316008, query=3D'INSERT INTO "teste_carga"("s1", "i= 1", "n1", "n2") VALUES (00001,0000000001,'0000000001") VALUES '::numeric,'0000000110H=C3=A9'::numeric)' send_query: done sending query read 1, global_socket_buffersize=3D4096 send_query: got id =3D 'Z' read 62, global_socket_buffersize=3D4096 send_query: got id =3D 'E' send_query: 'E' - ERROR: invalid byte sequence for encoding "UTF8": 0xe95d08 --=20 View this message in context: http://old.nabble.com/ODBC-Numeric-field-issu= e-tp28486416p28486416.html Sent from the PostgreSQL - odbc mailing list archive at Nabble.com.