I have been trying to use the following code to retrieve the column names of
a derby database table called "Client". conn is a legitimate Connection
Object. For some reason, rsColumns.next() never evaluates to true, so the
while loop never executes.
DatabaseMetaData meta =
conn.getMetaData();
ResultSet rsColumns = meta.getColumns(null, null,
"Client", null);
String columns = "Column
Names: ";
String columnName = "";
while (rsColumns.next())
{
columnName = rsColumns.getString("COLUMN_NAME");
columns = columns + columnName;
if (rsColumns.next())
insertString = insertString + ", ";
}
I am using Derby 10.2.1.6 and JDK 1.6.0 on Windows XP Professional. What am
I overlooking here? I appreciate any help.
Thanks,
Sisilla
--
View this message in context:
http://www.nabble.com/Getting-Column-Names-From-A-Table-tf3020453.html#a8388738
Sent from the Apache Derby Users mailing list archive at Nabble.com.