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

Re: psqlODBC 'ERROR: invalid input syntax for integer: "

From: "Greg Campbell" <greg(dot)campbell(at)us(dot)michelin(dot)com>
To: Michael Goei <postgres(at)ballistech(dot)com>
Cc: "'pgsql-odbc(at)postgresql(dot)org'" <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: psqlODBC 'ERROR: invalid input syntax for integer: "
Date: 2005-03-30 19:39:41
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
I tried to use domains once, and Access/ODBC completely did not 
understand the data type, so I changed to a primitive data type (int4) 
and things worked. I did not have time to debug whether the issue was 
Access or the ODBC driver implementation or the ODBC standard.

Michael Goei wrote:

>I'm attempting to link the postgres table with MS Access, via the ODBC
>driver.  After the link process, when I open the linked table from within MS
>Access, an error is generated.  When I inspect the connection log, I find
>the following entry (SQL auto-generated by MS Access/ODBC):
>conn=122491600, query='SELECT
>"id","unid","rid","trxtype","bilb","entjobcustid"  FROM "public"."trx"
>WHERE "id" = 'A' OR "id" = 'Ø' OR "id" = 'Ù' OR "id" = 'Ú' OR "id" =
>'Û' OR "id" = 'Ü' OR "id" = 'Ý' OR "id" = 'Þ' OR "id" = 'ß' OR "id" =
>ERROR from backend during send_query: 'ERROR:  invalid input syntax for
>integer: "A"'
>STATEMENT ERROR: func=SC_execute, desc='', errnum=7, errmsg='Error while
>executing the query'
>I believe that MS Access (or ODBC) is misinterpreting the id field.  It's
>actually defined as a custom domain of type int4, but because of the
>misinterpretation, MS Access is trying to select a page full of records
>using erroneous SQL (it assumes that the "id" field is character instead of
>When I create a test table and specify that the attribute "id" is of type
>int4 (instead of a custom int4 datatype), then MS Access/ODBC can open the
>table from it's GUI properly.  So, I've traced the problem down to a
>misinterpretation of the custom domain.
>I'm looking for a solution that will allow MS Access/ODBC to recognize the
>int4 domain and open the table properly.
>-----Original Message-----
>From: Peter Eisentraut [mailto:peter_e(at)gmx(dot)net]
>Sent: Wednesday, March 30, 2005 10:08 AM
>To: Michael Goei
>Cc: 'pgsql-odbc(at)postgresql(dot)org'
>Subject: Re: [ODBC] psqlODBC 'ERROR: invalid input syntax for integer:
>Michael Goei wrote:
>>Can someone please help me solve this problem please?
>Well, the column is defined as an integer and you are trying to put 
>non-numeric characters in it.  Why is that?

Attachment: greg.campbell.vcf
Description: text/x-vcard (283 bytes)

In response to

pgsql-odbc by date

Next:From: Joel FradkinDate: 2005-03-30 20:15:31
Subject: delphi access question?
Previous:From: Marko RistolaDate: 2005-03-30 19:22:41
Subject: Re: Transactions and savepoints

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