This is weird:

I have a call to
DatabaseMetaData.getPrimaryKeys(null, "EMP", "Employees");
that works perfectly in Java, on my Mac, accessing both DB2/400 and MySQL, and works perfectly from RPG if I'm accessing DB2/400. Yet if I try to call it on a MySQL database from RPG, it throws an exception that shows up in the joblog as
Incorrect database name ''" when calling method "getPrimaryKeys"

I know that the DatabaseMetaData object is valid, because it shows up as nonzero in the debugger, and an earlier call had successfully retrieved both the driver version and the product name from the DBMD. And I know that the catalog parameter is genuinely being passed as null, and the schema and table are not.

Please see my query on the RPG list
http://archive.midrange.com/rpg400-l/201302/msg00242.html
for details.

--
JHHL




Return to Archive home page | Return to MIDRANGE.COM home page