tags:

views:

20

answers:

1

I was wondering if data types in a a literal "create table" statement, executed over ODBC, are replaced with their database specific counterparts (platform is Windows/.Net/C#). I cannot find this feature in the ODBC docs, and there seems to be no list of literal "ODBC data types". However, I know that this works for Oracle, SQL Server and Access; the following statement is executed correctly, although the type LONGVARBINARY is no native type in all of these systems:

CREATE TABLE (MYCOLUMN LONGVARBINARY)

However, e.g. for Oracle the mapped native type depends on the used ODBC driver.

Is this an undocumented feature? Is there a list of supported type names anywhere? Thanks!

A: 

In general, the answer is no. It would be dependent on the individual ODBC drivers (and possibly different from every vendor if it were supported). I have not seen anything in the ODBC specification that describes "common" data type names. Most calls into ODBC do go through the ODBC driver manager, but I am not aware of any situations in which it would perform translation/modification of SQL statements being passed through it.

Mark Wilkins