logo       

Re: psqlODBC 'ERROR: invalid input syntax for integer: ": msg#00125

Subject: Re: psqlODBC 'ERROR: invalid input syntax for integer: "
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@xxxxxxx]
Sent: Wednesday, March 30, 2005 10:08 AM
To: Michael Goei
Cc: 'pgsql-odbc@xxxxxxxxxxxxxx'
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/

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe