pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Campbell <greg.campbell@us.michelin.com>
To: Michael Goei <postgres@ballistech.com>
Cc: 'pgsql-odbc@postgresql.org' <pgsql-odbc@postgresql.org>
Subject: Re: psqlODBC  'ERROR:  invalid input syntax for integer: "
Date: Wed, 30 Mar 2005 14:39:41 -0500
Message-ID: <424B007D.2030001@us.michelin.com> (raw)
In-Reply-To: <C969C878B71ED311AA2500104B973EF5632761@WWW>
References: <C969C878B71ED311AA2500104B973EF5632761@WWW>

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
>int4).
>
>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.
>
>Thanks,
>
>mg
>
>-----Original Message-----
>From: Peter Eisentraut [mailto:peter_e@gmx.net]
>Sent: Wednesday, March 30, 2005 10:08 AM
>To: Michael Goei
>Cc: 'pgsql-odbc@postgresql.org'
>Subject: Re: [ODBC] psqlODBC 'ERROR: invalid input syntax for integer:
>"A"'
>
>
>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?
>
>  
>

Attachments:

greg.campbell.vcf (text/x-vcard, 281B) download begin:vcard fn:Greg Campbell n:Campbell;Greg org:Michelin North America;ENG-IT adr;dom:;;2420 Two Notch Road;Lexington;SC;29071 email;internet:greg.campbell@us.michelin.com title:Systems Engineer tel;work:803-951-5561 tel;fax:803-951-5531 x-mozilla-html:FALSE version:2.1 end:vcard

view thread (4+ messages)

Message-ID: <424B007D.2030001@us.michelin.com>
Permalink:  ../424B007D.2030001@us.michelin.com/
Also on:    postgresql.org/message-id/424B007D.2030001@us.michelin.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: greg.campbell@us.michelin.com, postgres@ballistech.com
  Subject: Re: psqlODBC  'ERROR:  invalid input syntax for integer: "
  In-Reply-To: <424B007D.2030001@us.michelin.com>
  References: <C969C878B71ED311AA2500104B973EF5632761@WWW> <424B007D.2030001@us.michelin.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox