X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2A94153648 for ; Wed, 30 Mar 2005 20:39:51 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 12768-09 for ; Wed, 30 Mar 2005 19:39:48 +0000 (GMT) Received: from gk-us2.michelin.com (gk-us2.michelin.com [156.65.14.19]) by svr1.postgresql.org (Postfix) with ESMTP id EC0C3535CD for ; Wed, 30 Mar 2005 20:39:46 +0100 (BST) Received: from ONCMH1.onc.michelin.com (unverified) by gk-us2.michelin.com (Content Technologies SMTPRS 4.3.10) with ESMTP id for ; Wed, 30 Mar 2005 14:32:07 -0500 Received: from oncmtap1.onc.michelin.com by oncmh1.onc.michelin.com with ESMTP for pgsql-odbc@postgresql.org; Wed, 30 Mar 2005 14:34:03 -0500 Received: from oncems01.onc.michelin.com ([156.65.125.150]) by oncmtap1.onc.michelin.com (Netscape Messaging Server 4.15) with ESMTP id IE6JY900.EHO for ; Wed, 30 Mar 2005 14:39:45 -0500 Received: from us.michelin.com (unverified) by oncems01.onc.michelin.com (Content Technologies SMTPRS 4.2.5) with ESMTP id ; Wed, 30 Mar 2005 14:39:45 -0500 Message-Id: <424B007D.2030001@us.michelin.com> Date: Wed, 30 Mar 2005 14:39:41 -0500 From: "Greg Campbell" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Goei Cc: "'pgsql-odbc@postgresql.org'" Subject: Re: psqlODBC 'ERROR: invalid input syntax for integer: " References: In-Reply-To: Content-Type: multipart/mixed; boundary="------------070302070904010700040309" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.034 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/130 X-Sequence-Number: 5148 This is a multi-part message in MIME format. --------------070302070904010700040309 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit 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? > > > --------------070302070904010700040309 Content-Type: text/x-vcard; charset=utf8; name="greg.campbell.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="greg.campbell.vcf" 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 --------------070302070904010700040309--