Home Tutorialhelp Comment re: metaData without having to select the whole ta

 
 

Comment

Witold Szczerba
re: metaData without having to select the whole ta,
June 12, 2008 at 4:27 PM

Hi there,
you can get the metaData object from preparedStatement, so there is no need to query database, for example:
Connection connection = ...
PreparedStatement ps = connection.prepareStatement("SELECT * FROM someTable");
ResultSetMetaData rsmd = ps.getMetaData();

As JavaDoc says:
Retrieves a ResultSetMetaData object that contains information about the columns of the ResultSet object that will be returned when this PreparedStatement object is executed.
View All Comments | View Tutorial
Advertisement
Related Tutorial and Articles
Advertisements Advertisements
 

 

 

DMCA.com