http://www.brentozar.com/archive/2009/09/whats-on-my-bookshelf/
// prepare dummy query PreparedStatement WSps = WSc.prepareStatement ("SELECT * FROM UnknownTable WHERE 1 = 0"); // query is not executed on the server - only prepared ResultSetMetaData WSsmd=WSps.getMetaData(); int numcols = WSrsmd.getColumnCount(); ... int ctype = WSrsmd.getColumnType(n) ... // Result column information has now been obtained. // Note we also know the column ordering within the // table!













