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...


Explain the sequence of steps to connect to the database?

Answers were Sorted based on User's Feedback



Explain the sequence of steps to connect to the database?..

Answer / devarathnam c,kotagudibanda(po

Hi... These are the steps to connecting to the database
1: Loading the drivers
2:Get the connection
3:Create the statement
4:Execute the query
5:Process the resultset
6:Close the connection

Is This Answer Correct ?    18 Yes 0 No

Explain the sequence of steps to connect to the database?..

Answer / v.kannan

1.Register the Driver
2.Mention the Database Name
3.get the Connection through Driver Manager
4.send the Sql Query
5.get the result through ResultSet

Is This Answer Correct ?    7 Yes 1 No

Explain the sequence of steps to connect to the database?..

Answer / william

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

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 information is taken out of the code, therefore if changes need to be made - such as the machine the db resides on, the driver, etc - the application does not have to be recompiled and redeployed.

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More JDBC Interview Questions

Which interface handles transaction management in jdbc?

0 Answers  


What do you understand by DDL and DML statements?

0 Answers  


Explain the various types of locking system in jdbc?

0 Answers  


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

0 Answers  


How many types of jdbc drivers are there?

0 Answers  


What is Type-4 Driver and when this driver is used?

3 Answers  


What is resultset?

0 Answers  


What is meant by a ResultSet?

3 Answers  


Write a program JDBCcode forfetching student database with SQL.

0 Answers  


Give an example for execution of sql statement.

0 Answers  


How can you sort dates?

1 Answers  


how to prevent finally block from execution

4 Answers   Bosch,


Categories