× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Ok, so I've successfully set up a MySQL server on a box with a fixed internal IP address, and I can definitely reach it from both my Mac and my V6 box.

And I can get the database metadata, because when it gets to this block of code

Row1 = 'Driver Version = "' + DBMD_GetDriverVersion(dbmd) +
'" Product Name = "' + DBMD_GetDatabaseProductName(dbmd) + '"';
except;

it spits out
Driver Version = "mysql-connector-java-5.1.22 ( Re" Product Name = "MySQL"

But then, the next thing it tries to do is:

rs = JDBC_GetPrimaryKeys(dbmd: '*NULL': 'emp': 'Employees');

which gets processed in the service program thusly (to turn '*NULL' into a Java null, and any other RPG string into a Java String):

jdbc_begin_object_group(50);
if (catalog = '*NULL');
cat = *NULL;
else;
cat = s(catalog);
endif;
if (schema = '*NULL');
sch = *NULL;
else;
sch = s(schema);
endif;
monitor;
temp = getPrimaryKeys(dbmd: cat: sch: s(table));
jdbc_end_object_group(temp: rs);
on-error;
jdbc_end_object_group();
return *NULL;
endmon;

return rs;


which works just fine connecting to DB2/400 on the same box (carrying coals to Newcastle . . . ), and the corresponding Java statement:

ResultSet mdrs = dmd.getPrimaryKeys(null, "EMP", "Employees");

works just fine on DB2/400 and both a local MySQL server and the test MySQL server, but when the RPG call gets to the "temp = getPrimaryKeys" in the service program, something trips the monitor, returning a null result set, I get a Java error message of
Incorrect database name ''" when calling method "getPrimaryKeys"

in the joblog, and ultimately, I end up with four(!) pairs of QPDSPJOB and QPSRVDMP spool files, and no idea what the JVM could be objecting to.

The '*NULL' is correctly being turned into a Java null, and it's definitely getting the correct schema and table names. And the Java version works with the schema in either all-uppercase or all-lowercase.

I just don't get it.

--
JHHL

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.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 on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.