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

How can I instantiate and load a new CachedRowSet object from a non-JDBC source?

989


RowSetInternal caller and returns void. What can I do in the readData method?

981


How can we set null value in jdbc preparedstatement?

966


What is jdbc odbc bridge in java?

1077


How to insert and delete a row programmatically? (new feature in JDBC 2.0)

996


How a database driver can be loaded with jdbc 4.0 / java 6?

942


Which package contains jdbc api?

1043


Explain how to make updates to the updatable resultsets.

923


What is a connection string used for?

971


What is a jdbc driver and how many jdbc drivers are available?

1053


What is odbc and jdbc in dbms?

963


What is the full form of jdbc?

1030


What is ojvm used for?

988


How do I find whether a parameter exists in the request object?

916


What is the purpose of jdbc?

1045