Unexpected ADO properties

From: Bernard Henry Voynet <bhv(at)quebecemail(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Unexpected ADO properties
Date: 2005-08-20 18:53:39
Message-ID: 20050820115339.D2B57834@dm21.mta.everyone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hello
I am working on a project that access databases through ADO
over ODBC and must now include PostgreSQL.

The code of this project needs to know about the fields
caracteristics like whether or not it is:
- a primary key
- an autoincrement key
- nullabble
- updatable
- etc..

For this I use the ADO properties that give theses
informations.

For a Jet database I get (for example):
serialkey
Type = adInteger
DefinedSize = 4
Precision = 10
NumericScale = 255
Status = adRecOK
Attributes = adFldFixed
Properties (9)
BASECATALOGNAME (adVarWChar) = (Null)
BASECOLUMNNAME (adVarWChar) = serialkey
BASESCHEMANAME (adVarWChar) = (Null)
BASETABLENAME (adVarWChar) = genericfields
CALCULATIONINFO (adVarBinary) = (Null)
ISAUTOINCREMENT (adBoolean) = True
KEYCOLUMN (adBoolean) = True
OPTIMIZE (adBoolean) = False
RELATIONCONDITIONS (adVarBinary) = (Null)

However, with PostgreSQL 8.0.3 (psqlodc 08.00.0102), I don't get what is expected.

When I declare le serialkey field as as SERIAL PRIMARY KEY, instead of the expected result, I get:
serialkey
Type = adInteger
DefinedSize = 4
Precision = 10
NumericScale = 255
Status = adRecOK
Attributes = adFldUnknownUpdatable, adFldFixed, adFldIsNullable, adFldMayBeNull
Properties (9)
BASECATALOGNAME (adVarWChar) = (Null)
BASECOLUMNNAME (adVarWChar) = serialkey
BASESCHEMANAME (adVarWChar) = (Null)
BASETABLENAME (adVarWChar) = genericfields
CALCULATIONINFO (adVarBinary) = (Null)
ISAUTOINCREMENT (adBoolean) = False
KEYCOLUMN (adBoolean) = True
OPTIMIZE (adBoolean) = False
RELATIONCONDITIONS (adVarBinary) = (Null)

Where both:
- Attributes
- ISAUTOINCREMENT
Are not correct since serialkey is a non nullable serial key

Would you have any idea on this problem ?
And any help to get the right values ?

Best regards

_____________________________________________________________
Obtenez aussi votre adresse electronique gratuite de
Quebecemail.com http://www.quebecemail.com, un service gratuit et permanent.

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Johan Wehtje 2005-08-21 02:13:44 ODBC Call Failed on Subform
Previous Message Ing. Martin Šramko 2005-08-20 16:44:27 Re: "Official" version