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
for details.


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

This mailing list archive is Copyright 1997-2015 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact