• No replies
17917 Posts

Pinned topic szTableType of 'TABLE' with ODBC SQLTables function not working in DB2 ODBC

‏2013-04-01T04:18:23Z |
Dear Friends,

I am not sure if this is correct forum for DB2 ODBC driver queries or not.

According to ODBC API documentation for SQLTables, if we specify szTableType as 'TABLE', we should receive names of all 'TABLE' type objects.

But when I am using this in my application, I am getting no results, even though there are valid tables in a schema.

I am making SQLTables call as below:

SQLRETURN ret = SQLTables(stmt, catalog, SQL_NTS, "%", SQL_NTS, NULL, 0, "TABLE", SQL_NTS);

I am testing this on DB2 Express-C 10.1 database with ODBC driver installed from

Is 'TABLE' not supported in SQLTables function provided by DB2 ODBC driver?

Is my call to SQLTables wrong?

Thanks in advance for your help and time