From: | "Giovanni Zito" <g(dot)zito(at)acsys(dot)it> |
---|---|
To: | <pgsql-odbc(at)postgresql(dot)org> |
Subject: | Unexpected result for SQLGetTypeInfo for SQL_TYPE_TIMESTAMP |
Date: | 2003-12-11 13:31:44 |
Message-ID: | 000a01c3bfeb$1e732bf0$660100c0@PCZito |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
I'm using psqlodbc-07.03.02.00, (odbc driver 3.0) to access psql server from Windows (Postgres Server version is 7.2)
Before to start I tryed a simple test.
In my database I created a simple table with just a timestamp field:
CREATE TABLE table1 (
field1 timestamp (6) without time zone
)
You can see that the field1 has a decimal precision of 6.
My test odbc application declared SQL_ATTR_ODBC_VERSION as SQL_OV_ODBC3
retcode = SQLSetEnvAttr( henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_ODBC3, 0 );
Then I called SQLGetTypeInfo(SQL_TYPE_TIMESTAMP), so I was expected to found
0 for MINIMUM_SCALE
6 for MAXIMUM_SCALE
The SQLGetTypeInfo( SQL_TYPE_TIMESTAMP ) function returns:
19 for COLUMN_SIZE
0 for both MINIMUM_SCALE and MAXIMUM_SCALE
Then I've tried to call SQLColumns() function on "table1", field "field1".
retcode = SQLColumns(hstmt,
NULL, 0, /* All catalogs */
NULL, 0, /* All schemas */
(SQLCHAR*)"table1", SQL_NTS,
(SQLCHAR*)"field1", SQL_NTS);
Again it returns:
19 for COLUMN_SIZE
0 for DECIMAL_DIGITS
I was expecting to found 26 for COLUMN_SIZE and 6 for DECIMAL_DIGITS.
What's wrong????
Please HELP, IT'S URGENT!
-G.Z.-
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Combs | 2003-12-11 17:58:32 | Re: Sniffer to trace ODBC calls? |
Previous Message | Philippe Lang | 2003-12-11 11:11:07 | Re: Sniffer to trace ODBC calls? |