This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Please explain my problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Please explain my problem" Watch "Please explain my problem" New topic
Author

Please explain my problem

Fath_R
Greenhorn

Joined: Aug 07, 2008
Posts: 4
How can we access it connection reference through method because Connection is an interface & we have not possible to declare an
interface object?

Connection co=DriverManager.getConnection("sun.jdbc.odbc.JdbcOdbcDriver");

Same for Statement interface.
Statement s=co.createStatement()
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3703
    
    5

"RN_RN"

Welcome to JavaRanch. Please look carefully at the official naming policy at Javaranch & reregister yourself with a proper first & last name, with a space between them. Initials may be used for a first name, but not a last name. Please adhere to official naming policy & help maintain the decorum of the forum. The naming policy can be found at http://www.javaranch.com/name.jsp

Now back to your question... have you tried looking here


My Blog: Down Home Country Coding with Scott Selikoff
 
wood burning stoves
 
subject: Please explain my problem
 
Similar Threads
Connection is a interface & so how can we access it createStatement() on con object?
Interfaces
interface probelm?
Connection is interface so how can we access it createStatement() on connection objec
which concrete class has the implementation for createStatement method