Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to find the column count in resultset?

Answer Posted / babu h m

We need to use MetaData option on the ResultSet in order to
get the column count

ResultSet xSet = stmt.executeQuery() ;
ResultSetMetaData rsMetaData = xSet.getMetaData() ;
int numOfColumns = rsMetaData.getColumnCount() ;

Is This Answer Correct ?    12 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by metadata and why we are using it?

971


What is the use of jdbc?

941


What are collection pools?

909


Which type of driver provides jdbc access via one or more odbc drivers?

844


What is the purpose of the jdbc resultset interface?

867


Why we use jdbc instead of odbc?

916


What is the full form of jdbc and what is its purpose?

930


Name different methods for getting streams.

924


What is getconnection method in java?

871


What are four types of JDBC driver?

1052


What is meant by jdbc and odbc?

852


What is ojdbc14 jar?

853


What is a lock in jdbc?

903


Is jdbc secure?

914


What is thin driver in jdbc?

926