pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedpsqlODBC 'ERROR: invalid input syntax for integer: "A"'
4+ messages / 3 participants
[nested] [flat]
* psqlODBC 'ERROR: invalid input syntax for integer: "A"'
@ 2005-03-24 23:54 Michael Goei <postgres@ballistech.com>
0 siblings, 1 reply; 4+ messages in thread
From: Michael Goei @ 2005-03-24 23:54 UTC (permalink / raw)
To: pgsql-odbc
Hello PostgreSQL gurus!
Can someone please help me solve this problem please?
I'm using Microsoft Access 2000 (9.0.6926 SP-3) to access (PostgreSQL) 7.4.6
via the psqlODBC drivers (both versions 7.3.02 and 8.0.0101). The table I'm
accessing, "trx", has a primary key "id" column defined as a custom domain,
"id_dom". The relevant DDL code is below. When I attempt to link MSAccess
to the postgres table, I receive an error in the connection log: 'ERROR:
invalid input syntax for integer: "A"'. I've pasted more of the error log
below. I have several other tables with this same "id" column definition
and the ODBC driver is choking on those tables, yet it is connecting
properly to other tables (ones which don't have the "id" column).
I've searched http://search.postgresql.org/ and Google on this error to no
avail. I suspect this problem relates to the integer / single quote issue
referenced in previous posts. It may also relate to the domain I created,
but I'm not sure how to proceed.
I would like to get this ODBC driver connecting properly. Can anyone please
help?
Thanks in advance!
mg
*** DDL and error log below ***
CREATE DOMAIN id_dom
AS int4
NOT NULL;
CREATE TABLE trx
(
id id_dom NOT NULL DEFAULT nextval('trxID_seq'::text),
unid unid_dom,
rid rid_dom,
trxtype code2nn_dom,
bilb bool NOT NULL DEFAULT false,
entjobcustid rid_dom,
...
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'
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: psqlODBC 'ERROR: invalid input syntax for integer: "A"'
@ 2005-03-30 18:08 Peter Eisentraut <peter_e@gmx.net>
parent: Michael Goei <postgres@ballistech.com>
0 siblings, 0 replies; 4+ messages in thread
From: Peter Eisentraut @ 2005-03-30 18:08 UTC (permalink / raw)
To: Michael Goei <postgres@ballistech.com>; +Cc: pgsql-odbc
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?
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: psqlODBC 'ERROR: invalid input syntax for integer: "
@ 2005-03-30 18:20 Michael Goei <postgres@ballistech.com>
0 siblings, 1 reply; 4+ messages in thread
From: Michael Goei @ 2005-03-30 18:20 UTC (permalink / raw)
To: Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-odbc
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?
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: psqlODBC 'ERROR: invalid input syntax for integer: "
@ 2005-03-30 19:39 Greg Campbell <greg.campbell@us.michelin.com>
parent: Michael Goei <postgres@ballistech.com>
0 siblings, 0 replies; 4+ messages in thread
From: Greg Campbell @ 2005-03-30 19:39 UTC (permalink / raw)
To: Michael Goei <postgres@ballistech.com>; +Cc: 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
>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
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2005-03-30 19:39 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-03-24 23:54 psqlODBC 'ERROR: invalid input syntax for integer: "A"' Michael Goei <postgres@ballistech.com>
2005-03-30 18:08 ` Re: psqlODBC 'ERROR: invalid input syntax for integer: "A"' Peter Eisentraut <peter_e@gmx.net>
2005-03-30 18:20 Re: psqlODBC 'ERROR: invalid input syntax for integer: " Michael Goei <postgres@ballistech.com>
2005-03-30 19:39 ` Re: psqlODBC 'ERROR: invalid input syntax for integer: " Greg Campbell <greg.campbell@us.michelin.com>
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