A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
JDBC and Relational Databases
Joined: May 22, 2007
May 23, 2007 00:05:00
how get connection to database.
Joined: Mar 06, 2001
May 23, 2007 00:49:00
Joined: Apr 20, 2006
May 23, 2007 00:50:00
Use either of them
- Class in java.sql package
DataSource - Interface in javax.sql package
Both of them have a method called getConnection().
has it as a static method whereas DataSource's is an instance method. getConnection() gives you a java.sql.Connection object.
Also make sure of the
Driver Type as well. Depends on that you need to pass the Connection URL.
You can go through these links
JDBC Tutorial from Sun
JDBC articles in Sun
[ May 23, 2007: Message edited by: Raghavan Muthu ]
Everything has got its own deadline including one's EGO!
Java Beginners FAQ
Java Coding Guidelines
rocket mass heater
how to connect data base without jdbc?
java database connection
id of the new field in my table
Accessing ResultSet after closing Statement/Connection gives an Exception
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015