No replies
1731 Posts

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

‏2013-04-02T03:13:27Z |
Dear Friends,

I am using ODBC driver for connecting to and fetching the data from DB2 database server.

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