Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please explain my problem

 
Fath_R
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author
Saloon Keeper
Posts: 4031
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic