Home > Archive > SQL Anywhere database > April 2005 > SQLGetTypeInfo returns three rows - which one should I use?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author SQLGetTypeInfo returns three rows - which one should I use?

2005-04-15, 7:23 am

In the ASA 9.0 Sample database the employee table contains
a salery column of datatype numeric (20,3).

Using SQLColAttributes in the ODBC api gives me columns datatype: 2.
However, when calling SQLGetTypeInfo(2), I get three rows.

"TYPE_NAME", "DATA_TYPE", "COLUMN_SIZE", ...
"money", 0, 19, ...
"numeric", 2, 20, ...
"smallmoney", 0, 10, ...

1) why do I get three different results?
2) how do I know which is the correct one?
3) the resultset doesn't seems to be ordered
correctly (datatype, type_name), so I guess
I can't rely on the order.
So how do I make sure I get "numeric"?

TIA.

Regards/Peter Simonsen


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com