answersLogoWhite

0

What are the steps for getting a jdbc connection?

Updated: 8/17/2019
User Avatar

Wiki User

14y ago

Best Answer

-Loading the Driver

-Establish a Connection

-Execute Statements

-Get Resultset

-Close the database connection

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the steps for getting a jdbc connection?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Describe about JDBC architectural overview?

General JDBC Architecture consist of two layers: JDBC API - this provides the application to JDBC manager connection. JDBC driver API - this supports the JDBC manager to driver connection.


How do you load a class in Jdbc?

Ans:Loading a class in JDBC For getting connection to database and to query database for INSERT,UPDATE,DELETE and to do some operations on database through java programs you need to load the jdbc driver class for a particular database provided by the database provider for that you use class.forName() Method this method will load the class which are necessary for database operations


How can you connet java with sql in java programming?

JDBC mean Java Database Connectivity. In java, using JDBC drivers, we can connect to database. Steps to connect to JDBC. 1) Load the driver, using Class.forName(DriverName); 2) Get the connection object, Connection con = Driver.getConnection(loaded driver name); 3) Create a SQL statement, Statement s = con.createStatement(); 4) Create Resultset object using the statement created above, ResultSet rs = s.executeQuery("sql statement"); Iterate the result set to get all the values from the database. Finally don't miss this 5) s.close(); 6) con.close() ;


JDBC drivers and driver maneger?

JDBC Driver Manager is a class that manages a list of database drivers. It matches connection requests from the java application with the proper database driver using communication sub protocol.


What is type 4 jdbc driver?

JDBC is short for java database connectivity. There are 4 type of JDBC drivers : 1) JDBC-ODBC 2) Native-API 3) JDBC-Net 4) Native-Protocol.


What happens if connection is not closed in a jdbc program?

if we don't close the connection , it wil lead to connection memory leakage.unless until application server/web server is shut down ,connection wil remain activate even though the user logs out .


What is a base connection?

When we create a website or a project in programming language we need to use a database for storing the data . A database connection used to establish a connection between the server and the client. For this jdbc jar is added in the project in case of java .


Steps in connection access to the internet?

steps in the connection access to the internet


How do you connect databases?

TO connect database two things are require: 1) JDBC driver 2) ognl.jar Using these two we can create a database connection.


Is it possible while developing any software by using java can you manage database?

Yes. In Java this is done through the JDBC classes.Yes. In Java this is done through the JDBC classes.Yes. In Java this is done through the JDBC classes.Yes. In Java this is done through the JDBC classes.


List four JDBC drivers?

JDBC ODBC BridgeNative API Partly Java DriverNet Protocol full Java driverare some types of jdbc drivers


What is the difference between JNDI and JDBC?

JDBC is java database API, while JNDI is java native directory API. The main thing in here is that in a JNDI directory you're actually storing a JDBC DataSource, so, you're simply using JDBC and obtain a Connection via JNDI lookup. In short words: JDBC is Database realm, JNDI lets you store Objects in a virtual context (the Directory) that can be local, remote (Implementation details usually don't matters). You access this context via names, obtaining stored objects, is good to share things among different modules. Application Servers usually have a JNDI Context for sharing global objects amon different application, Connection Poolers happen to be one of the most clear example of why sharing via JNDI is good. (Define 1 connection pooler, share between several webapps)