I want to list the primary keys for a table in a DB2 database. Using odbc_tables(), I can find the qualifier and owner of a table. The row for table "ARSUSER" is the following:
TABLE_QUALIFIER TABLE_OWNER TABLE_NAME
ROOT ARSUSER
So this particular table has no qualifier and is owned by root.
Therefore, I should be able to use the following segment of code to find the primary keys for "ARSUSER":
$result = odbc_primarykeys($dbconn, null, "root", "arsuser");
odbc_result_all($result);
BUT, this returns "No Rows Found"! I've tried capitalizing "root" and "arsuser", but I get the same result. I've also tried using the wildcard character, "%", but without success.
Is there a problem with odbc_primarykeys()??
TIA,
-TIM