freelanceprogrammers.org Forum Index » Java

ResultSet question


View user's profile Post To page top
estrose Posted: Mon Feb 25, 2002 2:04 am


Joined: 18 Feb 2002

Posts: 6
ResultSet question
I can`t find two methods from API that i really
need at the moment.<br>1.How can i get the number of
columns inside my java.sql.ResultSet object? I made my
own method for that, but API method could be more
nice.<br>2.How can i get each column name?<br><br>Thx.
Reply with quote
Send private message
View user's profile Post To page top
cnik70 Posted: Mon Feb 25, 2002 6:47 am


Joined: 01 Feb 2002

Posts: 13
ResultSet question
You`ll need to use ResultSetMetaData to get the
details of the results returned.<br>ResultSet
rsSet;<br>ResultSetMetaData rsMeta = rsSet.getMetaData();<br><br>This will
allow you to get rows, column names, etc.<br><br>-Cnik
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
Booking Calendar - reservation calendar script
Land Surveying - total station instruments and equipments
China Wholesale - Electronics Products
Character Studio - Tutorials and Help