The following bug has been logged online:
Bug reference: 2809
Logged by: Brien R. Givens
Email address: ic3b3rg@gmail.com
PostgreSQL version: 8.2
Operating system: Win XP
Description: Incorrect ASP/ADO data types (ODBC Driver)
Details:
Hi,
In ADO, a boolean field is identified as adChar (129).
-----------
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Driver={PostgreSQL
ANSI};Server=<host>;Database=<db>;UID=<user>;PWD=<pass>"
conn.Execute "CREATE TABLE test (col1 BOOL)"
Set rs = Server.CreateObject("ADODB.recordset")
rs.Open "test", conn, adOpenStatic, adLockReadOnly, adCmdTableDirect
Response.Write rs(0).Type & ", " & adChar
rs.Close
conn.Close
-- Output --
129, 129
------------
The field type should be adBoolean (11) - there is no other way to determine
that the field type is actually boolean from within ADO.
Also, all the following PostgreSQL data types are identified as adVarChar
(200) in ADO:
ACLITEM
BIT
BIT VARYING
BOX
BPCHAR
CHARACTER VARYING
CID
CIDR
CIRCLE
INET
INT2VECTOR
INTERVAL
INTERVAL DAY TO SECOND
INTERVAL YEAR TO MONTH
LINE
LSEG
MACADDR
NAME
OIDVECTOR
PATH
POINT
POLYGON
REFCURSOR
REGCLASS
REGOPER
REGOPERATOR
REGPROC
REGPROCEDURE
REGTYPE
RELTIME
SMGR
TID
TIMETZ
TINTERVAL
UNKNOWN
VARBIT
VARCHAR
TEXT
It would be helpful if a more meaningful correlation to ADO data types was
established.