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 do you know which driver is connected to a database?

Answer Posted / nadia

// By the help of DatabaseMetadata it gives all the
information about the date base for which our progrim is
connected
// here it goes

1.Class.forName("DriverClass name");
2.Connection con =DriverManager.getConection("URL Of
Manager Class");
DatabaseMetadata dmeta= con.getMetadata();
// by calling the method getDriverName() name we can
able to know that which driver is coonected to the database.
3. System.out.println(" driver name " +
dmeta.getDriverName());

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to rollback a JDBC transaction?

1142


What are the different types of statements in jdbc?

967


Give an example for getXXX method?

1027


Can we have foreign key reference to a non primary key column ?

1028


What are the conditions applies to varchar variable, when using in procedures?

2212


Can resultset be null in java?

982


Why we use jdbc instead of odbc?

1033


What is the JDBC?

1155


Can I set up a connection pool with multiple user IDs? The single ID we are forced to use causes problems when debugging the DBMS.

1002


What is database connection pooling? Advantages of using a connection pool?

1096


Write an sql to find all records having all upper case alphanumeric characters in a field ?

1000


What does the jdbc driver interface do?

1043


Does the database server have to be running Java or have Java support in order for my remote JDBC client app to access the database?

1018


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

964


What is the jdbc rowset?

1033