answersLogoWhite
Database Programming
Java Programming
Oracle Database

What is Jdbc and how you connect Java with database?

222324

Top Answer
User Avatar
Wiki User
2010-07-05 17:02:09
2010-07-05 17:02:09

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() ;

1

Related Questions

User Avatar

JDBC stands for Java Database Connectivity. A JDBC connection is required for every java program that wants to connect to a database for data

User Avatar

JDBC driver is an interface enabling a java application to interact with a database. To connect with individual database, JDBC requires drivers for each database.

User Avatar

Connecting to Java from within a Oracle database is not possible. However, if you want to connect to an Oracle database from Java, you can use JDBC for the same. JDBC stands for Java DataBase Connectivity which is the framework that helps Java applications connect to databases like Oracle

User Avatar

JDBC stands for Java Database connectivity which is a standard java API for database. It is for database connectivity with project.

User Avatar

JDBC which is short for java database connectivity is used to connect database to a java project . To make connectivity a database driver is required to establish the connection.

User Avatar

By using JDBC/hibernet

User Avatar

JDBC stands for Java Data Base Connectivity. As the name suggests the package is reposnisble for database connectivity. It is a standard API defined for database access.

User Avatar

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.

User Avatar

jdbc-odbc bridge is a jdbc driver required to connect java application to the specified database. Using this driver the java calls are converted to the odbc calls and then are referred to the database. Since odbc driver are the implemetation of the API written in C language. As in the case of this driver the API is provided by Sun MicroSystem itself and the implementation of these API is done by the Database Vendors.

User Avatar

Yes , you can create a database using a form . But you have to do two things First make a form in html or jsp whatever you like. Then Connect the form to database using java database connectivity.

User Avatar

Use the JDBC functionality to open a connection to SQL Server. You can read up on how here: http://java.sun.com/javase/technologies/database/

User Avatar

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.

User Avatar

JDBC is the acronym for "Java Database Connectivity". JDBC actually offers a two-way interface towards a specific database (like for example Oracle or DB2) and to the actual Java application. The technical part towards the database is encapsulated in a vendor-dependent "database driver", but the part towards the Java application is totally vendor independent. Hence if the database gets replaced by a different vendor mostly no coding changes are necessary.

User Avatar

JDBC stands for Java Database Connectivity . It was developed by Java soft and is a part of Java Enterprise API. JDBC is the first standardized API that allows the users to develop database front ends without continously rewriting their code. JDBC provides the ability to create robust, platform-independent application and wev-based applets, wihich can acces any database through a DBS-independent mechanism. The interaction between these application and applets with SQL data sources is done through a set of relational database objects and methods defined is the JDBC API.

User Avatar

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

User Avatar

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

User Avatar

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.

User Avatar

If you want to connect to any database, you need to follow certain methods. Start by creating a database connection, configuring, binding data and testing.Different programming languages have different ways to connect. For example, in visual studio .Net, if you want to connect to any database then you need to follow the database configuaration wizard. That means you connect your application to a database by running the "data source configuration wizard" and selecting database on the "choose a data source type" page.Another example: suppose you are using Java..Regardless of whether you're trying to connect to Oracle, SQL Server, MySQL, Postgres, mSQL, Interbase (or any other JDBC data source), establishing a connection to a database with Java JDBC is a simple two-step process:1)Load the JDBC driver.2)Establish the JDBC connection to your databaseYou can also use Microsoft Access and once you have data objects such as tables, views, proceduers, etc. then you can connect by following the self explanatory wizards.This answer might give you a generic idea since the question is a generic question.If you need further assistance then send your query to:palemjn@hotmail.comJitendra**Grammar corrected by gbaughma**Additional note from gbaughma: MS Access doesn't do stored procedures. ;)

User Avatar

Graham Hamilton has written: '100 Years of football' 'JDBC database access with Java'

User Avatar

No. SQL stands for Structured Query Language and that in itself is a language and it is totally different from Java. However, you can use SQL queries inside Java code with the help of JDBC (Java DataBase Connectivity). But the Java compiler cannot understand/compile standalone SQL syntax unless it is used as part of JDBC.

User Avatar

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

User Avatar

The JDBC exists so that you can change the underlying driver with just a change of a String, and still be able to execute the same statements on a different type of database. In summary, it was made so that you don't have to redesign your entire application to change database types.

User Avatar

Actually coming to this one, we need to discuss about those companies which are invented the java(Sun Micro System) and database(Oracle), in olden days these companies were tie up that time, so that's why we are accessing the database with application program written in java. now coming to our topic, We need to select the suitable drivers to our application(Desktop or Web Application) load the drivers through application. Those drivers are JDBC drivers, JDBC is nothing but pool of drivers in which some drivers are default in Windows OS, when ever we create the DATABASE Application like ORACLE, then automatically drivers are also included in JDBC.

User Avatar

There are many kinds of statements that are used in Java and they are predominantly used for database connectivity using JDBCEx:PreparedStatement - for normal SQL QueriesCallableStatement - for stored procedures

User Avatar

Java database connectivity can be accessed through the java website. One way is using hibernating with ms access 2007 database, with a free driver. You can also reverse the setup threw the plug-ins.


Copyright © 2020 Multiply Media, LLC. All Rights Reserved. The material on this site can not be reproduced, distributed, transmitted, cached or otherwise used, except with prior written permission of Multiply.