× 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've noticed that since we have been upgrading our partitions that the column label text returned for any files from JAVA is now returning only null values. According to http://docs.oracle.com/javase/6/docs/api/java/sql/DatabaseMetaData.html#getColumns(java.lang.String, java.lang.String, java.lang.String, java.lang.String) GetColumns - Retrieves a description of table columns available in the specified catalog and REMARKS returns a string containing comment describing column. (may be null)

I've tested this using the following code. Luckily, we still have an old partition on 6.1, so I could verify. I guess, I'll enter a PMR tomorrow.

import java.sql.*;
public class ListColumns {
public static void main(String args[]) {
Connection con;
Statement stmt;
String system = "XXXXXXXX";
String collectionName = "LIBRARY";
String tableName = "FILENAME";
try {
DriverManager.registerDriver(new
com.ibm.as400.access.AS400JDBCDriver());
con = DriverManager.getConnection ("jdbc:as400://" + system);
DatabaseMetaData dmd = con.getMetaData ();
ResultSet res = dmd.getColumns(null, collectionName, tableName, null);
System.out.println("List of columns: ");
while (res.next()) {
System.out.println(
" "+res.getString("TABLE_SCHEM")
+ ", "+res.getString("TABLE_NAME")
+ ", "+res.getString("COLUMN_NAME")
+ ", "+res.getString("REMARKS")
+ ", "+res.getString("TYPE_NAME")
+ ", "+res.getInt("COLUMN_SIZE")
+ ", "+res.getString("NULLABLE")
);
}
res.close();
con.close();
} catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
}
System.exit (0);
}
}

Jim

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.