Java Jdbc connection


Java Jdbc connection

What are the steps involved for making a connection with a database or how do you connect to a database?
View Answers

October 27, 2010 at 5:25 PM


Here is the answer,

First, you need to establish a connection with the data source you want to use. A data source can be a DBMS, a legacy file system, or some other source of data with a corresponding JDBC driver. Typically, a JDBC application connects to a target data source using one of two classes:



For detail study of JDBC go to the link given below-

Click Here


April 19, 2012 at 1:18 PM

While making a JDBC connection we go through the following steps: Step 1 : Register the database driver by using : Class.forName (\" driver class for that specific database\??); Step 2 : Now create a database connection using : Connection con = DriverManager.getConnection (URL, username, password); Step 3: Now create a query using: Statement stmt = Connection. Statement (\"select * from TABLE NAME\"); Step 4: Execute the query: stmt.exceuteUpdate ();


Related Tutorials/Questions & Answers:
Java jdbc connection
Java jdbc connection  Does the JDBC-ODBC Bridge support multiple concurrent open statements per connection
Java Jdbc connection
Java Jdbc connection  What are the steps involved for making a connection with a database or how do you connect to a database
Java Jdbc connection
Java Jdbc connection  What are the two major components of JDBC
Java-Connection Pool - JDBC
Java-Connection Pool  How can I create a connection pool. My database... is Weblogic 8. Which is the best approach to create a connection pool? ...{ public static void main(String[] args){ Connection con = null; String url
Java Jdbc connection
Java Jdbc connection  What is the use of Class.forName
Java-Connection Pool - JDBC
Java-Connection Pool  How can I create a connection pool. My database is MS SQL server 2000(username-sa, pwd-admin) and my application server is Weblogic 8. Which is the best approach to create a connection pool? Kindly help
java database connection - JDBC
java database connection  sir i want to join my project with MS...{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection connect =DriverManager.getConnection("jdbc:odbc:access"); pstm=connect.prepareStatement("insert into data
Connection to jdbc - Java Beginners
Connection to jdbc  I need to populate a listbox in jsp with values from Postgresql JDBC. i used the following code... but its not working... can u suggest me with the correct solution. my.jsp my form
java connection - JDBC
java connection  iam unable to attach the printer to my application application:fee receipt in this iam unable to code the printer to print the receipt
jdbc connection to java program code - JDBC
jdbc connection to java program code  i want a simple java program that which communicates with oracle database like creating table,insert values and update records in database and show in program output? please take a simple
JDBC connection closed.. - Java Beginners
JDBC connection closed..  if the connections r closed..the values... the connection (jdbc) is closed)   Hello, As i know after connection closed you will get the value.I tried your question and found
JDBC ODBC Connection In Java
JDBC ODBC Connection In Java In this section we will read about the various aspects of JDBC ODBC such as, JDBC-ODBC bridge, JDBC ODBC connection, how.... Then we will create a class in Java and we will make a connection using JDBC
JDBC connection
JDBC connection  ![alt text][1]I got exception in Connecting to a MySQL Database in Java. The exception is ClassNotFoundException:com.mysql.jdbc.Driver wat is the problem
jdbc connection
"); Connection con = (Connection) DriverManager.getConnection("jdbc:mysql:// connection  How to Submit data????   <%-- view... { Class.forName("com.mysql.jdbc.Driver"); Connection con = (Connection
JDBC Connection Pool
JDBC Connection Pool In this section we will learn about JDBC Connection Pool... application will give you improved performance if you use the JDBC Connection pooling. What is JDBC Connection Pool? The database connection is expensive
JDBC connection pooling
JDBC connection pooling  What is Connection pooling
JDBC-Odbc Connection
in explaining JDBC Odbc Connection in Java. The code explains you a how creation... JDBC-ODBC Connection       JDBC-ODBC Connection is a JDBC driver that translates the operation
j2me jdbc connection - JDBC
j2me jdbc connection  hello, whn i m importing sql package in mine midlet(tried for both javax.sql.* and java.sql.*;)..itz nt accepting it... hw to get connected to database?????.... plz help me out
jdbc odbc connection
jdbc odbc connection  i need a program in java which uses a jdbc odbc connection   Hi, You can create odbc datasource on your windows computer and then access in your Java program. Read the JDBC ODBC example. Thanks
connection with xslx - JDBC
connection with xslx  hai to all i am not able to connecting to xlsx(2007 excel file) using jdbc?please help me?  Hi Friend, Please visit the following links:
Database Connection - JDBC
Database Connection  In java How will be connect Database through JDBC?  Hi Friend, Please visit the following link: Thanks
JDBC Connection and Registration
JDBC Connection and Registration   How to create a JDBC connection... your java with jdbc code.. It will create table in MS access database. Here..... :-)   JDBC MS Access Database Connectivity: Follow these steps: 1)Go
choosing best jdbc connection - JDBC
is the best type of Jdbc JDBC Net pure Java Driver A native-protocol pure Java driver converts JDBC technology into the network protocol...choosing best jdbc connection  among the four types of jdbc which one
jdbc connection issues
jdbc connection issues  Hello. kindly pls help in this issue...i have created 11 jsp form wit some attributs in it also created 11 tables... tables with only one jdbc connection program...if possiable pls post a sample code
JDBC connection and SQL Query - JDBC
JDBC connection and SQL Query  Hi, I'm reading a all files one after the other in a directory in java. storing the values in an array of string.../java/io/insertFileData.html Hope that it will be helpful for you. Thanks
connection pooling - JDBC
. In JDBC connection pool, a pool of Connection objects is created...++) { gObjPool.addObject(); } Connection connection = java.sql.DriverManager.getConnection("jdbc...connection pooling  how to manage connection pooling?   Hi
JDBC connection
JDBC connection       The JDBC... we illustrates you JDBC url connection. The current Tutorial helps you to understand JDBC connection. The code explains you   how
problem in jdbc connection
problem in jdbc connection  when i am trying to insert into apache derby databse using java in netbeans an exceprion is thrown at run time like this:- java.lang.ClassNotFoundException: org.apache.derby.jdbc.ClientDriver....what
Server DB connection - JDBC
Server DB connection  Hello Guys I want to connect two databases at the same time but it looks like the java is only picking up the second database... get it to work. If you have any sample code for getting connection please
Connection pooling - JDBC
Connection pooling  what is meant by connectio pooling and how...;connection pooling concept basically deals with the pool of object. In every... to the container about max and min connection object in the pool
Could not establish the connection to oracle - JDBC
to use: Connection conn = DriverManager.getConnection("jdbc:oracle:oci8... to use: Connection conn = DriverManager.getConnection ("jdbc:oracle:thin... oracle.jdbc.driver.OracleDriver()); Connection conn = DriverManager.getConnection("jdbc:oracle