Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC Interfaces

 
San Nan
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

can U Please Tell me where all Interfaces has been Implemented becoz we are not declaring out class with any Interface....

(e.g Resultset, Statement, PreparedStatement etc....)

(Where is the Implementation & how our Program/Class use it)

Thanks & regards

San Nan
 
Mani Ram
Ranch Hand
Posts: 1140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at this thread
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You do not need to implement those interfaces, they're implemented by the objects you get from the JDBC driver. The J2SE Guide has an introduction on how to use JDBC (http://java.sun.com/j2se/1.4.2/docs/guide/jdbc/getstart/GettingStartedTOC.fm.html)

Basically, you load the Driver or get a DataSource, then use that to get a Connection to your DB, with that you create a Statement which will allow you to retrieve a ResultSet (that's the whirlwind tour from 10000 feet high).

JDBC is too complex a subject to cover in a post like this, but the guide should get you started, and there are lots of introductory articles out on the web.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic