× 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.



I think that under the circumstances, I've already been asking more than too much of Mr. Klement, and so if somebody else can coach me on this, please do.

Which is to say that Sctt, you need to concentrate on healing.

But as to the matter where I need help: it appears that I'm going to have to do some things that involve non-trivial extensions to JDBCR4. Case in point, to find out what a file's primary keys are, through a JDBC connection, it seems I need to do something like:

conn = DriverManager.getConnection(DB_URL,USER,PASS);
DatabaseMetaData dmd = conn.getMetaData();
ResultSet mdrs = dmd.getPrimaryKeys(null, "EMP", "Employees");
while (mdrs.next()) {
System.out.println("column name: /" + mdrs.getString("COLUMN_NAME")
+ "/ KEY_SEQ: /"+ mdrs.getString("KEY_SEQ")
> + "/ PK_NAME: /" + mdrs.getString("PK_NAME") + "/");
};

(assuming we're looking at a table called "Employees," in a schema called "EMP," from the TutorialsPoint JDBC tutorial). This Java code works fine for both DB2/400 and MySQL. MySql produces:
column name: /id/ KEY_SEQ: /1/ PK_NAME: /PRIMARY/

while DB2/400 produces:
column name: /ID/ KEY_SEQ: /1/ PK_NAME: /Q_EMP_EMPLOYEES_ID_00001/

The problem is that JDBCR4 doesn't appear to have any front-end for the DatabaseMetaData class, let alone the Connection.getMetaData() and DatabaseMetaData.getPrimaryKeys(<catalog>, <schema>, <table>) methods.

While I managed to successfully front-end the GetColLabel(<index>), getPrecision(<index>), and getScale(<index>) methods, those appear to be Tinkertoys compared with front-ending DatabaseMetaData.

Can anybody help?

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