What are the steps in connecting to database?

Answer Posted / sanket pandit

An alternate, and preferred way, to using the DriverManager class is to use a DataSource object.

This is for SQ L Ans.
1. The data source is registered on the server side, which stores connection information, like: host, port, sid, credentials (optional), driver to use, etc.

2. The application gets a handle on the data source through a JNDI lookup.

3. The DataSource object is a connection factory and you can invoke .getConnection()

One of the reasons it is preferred over the DriverManager is because it is more flexible. The connection in

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the maximum pool size in ado.net connection string?

500


What is the difference between statement and preparedstatement interface?

563


What is the difference in an abstract class and an interface?

511


How to enable and disable connection pooling?

507


Define atomicity?

575






Difference between sqlcommand and sqlcommandbuilder?

581


What is openquery?

529


Where is adodb dll located?

527


Give few examples of datareader that is used in different dataproviders.

539


What are the disadvantages of using datalist?

510


How can we load multiple tables in to dataset?

571


Some important instruction regarding ADO.NET connection string ?

542


What you mean by filtering of data?

537


describe the dataset object in ado.net.

520


What is datasource in ado.net?

584