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?



How to find the column count in resultset?..

Answer / 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

More JDBC Interview Questions

What is the difference between setmaxrows(int) and setfetchsize(int)?

0 Answers  


In JDBC, All the API?s are interfaces? Where is the actual implementation?

3 Answers   HCL,


how to use CallableStatement? specially how to use their index given ..

1 Answers  


How to test jdbc connection to sql server?

0 Answers  


Where is jdbc used?

0 Answers  


How does a custom RowSetReader get called from a CachedRowSet?

0 Answers  


How do java applications access the database using jdbc?

0 Answers  


Which is better jpa or jdbc?

0 Answers  


What does it mean to "materialize" data?

0 Answers  


how can we connect to db without using getConnection() method

4 Answers  


What is the role of the jdbc drivermanager class?

0 Answers  


What are the main components of JDBC ?

0 Answers  


Categories