How do you create Connection?

Answer Posted / suresh kumar

to create connection first we have to load the driver using
class.forName(drivername)
then register the driver using DriverManager.getConnection()
afterwards you can create Statement object and u can
execute the qurey

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are different types of ResultSet?

754


Why did my jdbc code throw a rollback sqlexception?

648


please tell me the name and url path for type-4 driver ?

2765


What is jdbc vs odbc?

691


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

729






What is difference between java.util.Date and java.sql.Date?

706


Describe the steps needed to execute a sql query using jdbc.

714


What is SQL Warning? How to retrieve SQL warnings in the JDBC program?

710


How we store procedure in oralce for callable statements in jdbc

2028


The new features of the JDBC 2.0 API, will be supported for JDBC-ODBC Bridge?

1873


What is a rollback in jdbc?

683


What is data source in java?

682


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

752


what happen if we set JDBC string to NULL?

3117


How can we move the cursor in a scrollable result set?

704