Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IBMi, V7R1, Java 1.5, java.sql, DB2 - ResultSet.getTableName() always returns empty string

149 views
Skip to first unread message

Mr. K.V.B.L.

unread,
Apr 4, 2012, 1:26:18 PM4/4/12
to
Anyone tried to use this before? The basic setup is

ResultSet resultSet = selectStmt.executeQuery(some_query_string);
ResultSetMetaData rsmd = resultSet.getMetaData();

I found AS400JDBCResultSetMetaData but I don't know how much gutting I'll have to do in my application just to get this one routine to work.

For now I'm doing this to get around the problem

if (some_query_string.indexOf("TABLENAME") != -1) {
...
}

This needs to work on local and remote JDBC connections.
Message has been deleted

moti...@gmail.com

unread,
Jun 20, 2012, 2:02:38 PM6/20/12
to
getTableName() is supported only if the user has set the driver property "extended metadata" to true and the system returns us a table name, otherwise "".

eExample:

jdbc:as400://127.0.0.1;extended metadata=true

moti...@gmail.com

unread,
Jun 20, 2012, 2:01:40 PM6/20/12
to
getTableName() is supported only if the user has set the driver property "extended metadata" to true and the system returns us a table name, otherwise "".

0 new messages