I need to be able to access the column names that are returned by a query pragmatically since my application lets you view a DB table's schema and I won't know the column names until the user chooses a table to see the schema for. So I need to be able to access the column names through code.
With the old way I do
Code: Select all
stmt = con.prepareStatement(fields.SQLCMD.value);
rs = stmt.executeQuery();
rsm=new java.sql.ResultSetMetaData(rs.getMetaData());
Code: Select all
function (columnData) {
// get column names here
});