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

What is the use of statement in jdbc?

480


What is jdbc template?

529


How can I get or redirect the log used by DriverManager and JDBC drivers?

528


What is a statement in java?

519


What are the jdbc api components?

667






What is JDBC RowSet? What are different types of RowSet?

562


Under what circumstances, that all four drivers are used?

1913


Explain the life cycle of jdbc.

653


What is JDBC Connection? Explain steps to get Database connection in a simple java program.

628


How many types of jdbc drivers are available?

504


Where can I find info, frameworks and example source for writing a JDBC driver?

525


What is the full form of jdbc and what is its purpose?

551


What is jdbc connection string?

516


How many ways that we can view a result set?

549


What is statement and preparedstatement in java?

505