From: | Andy Hallam <ahm(at)exel(dot)co(dot)uk> |
---|---|
To: | pgsql-odbc(at)postgresql(dot)org |
Subject: | FW: [GENERAL] ODBC and Native error codes |
Date: | 2001-11-14 09:24:39 |
Message-ID: | 82AD8CCB34CED2119E2400105AF281909C8B6A@ntserver1.efacs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
-----Original Message-----
From: Hiroshi Inoue [mailto:Inoue(at)tpf(dot)co(dot)jp]
Sent: 08 November 2001 00:59
To: Andy Hallam
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] ODBC and Native error codes
Please post this to pgsql-odbc list.
Unfortunately PostgreSQL doesn't have error code
currently and so psqlodbc doesn't return any valid
Native error code.
regards,
Hiroshi Inoue
Andy Hallam wrote:
>
> PostgreSQL - 7.1.3 (installed on Linux 2.4.2-2)
> PSQLODBC.DLL - 07.01.0007
> Visual C++ - 6.0
>
> PostgreSQL does not return the standard ANSI Native SQL number through
> SQLGetDiagRec().
>
> I.e
>
> 1) - Select from a table that does not exist.
>
> ANSI Native sql code is -208
> SQL SERVER returns -208
> DB2 returns -204
> ORACLE returns -942
> PostgreSQL returns -7
>
> 2) - Select a column that does not exist on a valid table.
>
> ANSI Native sql code is -207
> SQL SERVER returns -207
> DB2 returns -206
> ORACLE returns -904
> PostgreSQL returns -7
>
> 3) - Referential integrity violated.
>
> -547 = Reference or constraint violated
> -2627 = Primary key violated
> -2601 = Duplicate key row
> PostgreSQL returns -7 for all the above scenarios ?
>
> Infact, PostgreSQL only ever return -7 !!!
>
> OK - PostgreSQL (Like all the other Database vendors above) does return an
> informative string, but it should also return the correct Native ANSI SQL
> number.
>
> Anyone know of a way to retreive this Native SQL number?
>
> Andy
> ahm(at)exel(dot)co(dot)uk
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.
************************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom
they are addressed. Any views or opinions are solely those of
the author and do not necessarily represent those of Exel
Computer Systems plc. If you have received this email in error
please notify Customer Services on 0115 946 0101.
************************************************************************
From | Date | Subject | |
---|---|---|---|
Next Message | PIPER,JIM (A-SantaClara,ex1) | 2001-11-14 16:34:26 | Re: MS Client ODBC question |
Previous Message | Christopher Kings-Lynne | 2001-11-14 01:27:18 | Re: [HACKERS] Last inserted id |