How do you create Connection?

Answer Posted / ramu

. To create connection first we have to load the driver using
class.forName(drivername)
. Get a connection to the database using DriverManager.getConnection()
after wards you can create Statement object and u can
execute the query

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you know about drivers and database information ?

629


What are the jdbc drivers in java?

589


Differentiate between a statement and a preparedstatement.

569


Give an example for getXXX method?

633


Does JDBC support stored procedures?

631






Why do we need jdbc driver?

547


Where is jdbc url mysql?

569


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

628


What are the basic exceptions in jdbc?

616


Why can't Tomcat find my Oracle JDBC drivers in classes111.zip?

653


Expalin the method of calling a stored procedure from jdbc.

626


How can I use the JDBC API to access a desktop database like Microsoft Access over the network?

621


What is createstatement method in java?

582


What is the difference between jdbc and odbc?

608


What is resultset in jdbc with example?

569