File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes which class implements Resultset Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "which class implements Resultset" Watch "which class implements Resultset" New topic
Author

which class implements Resultset

radhika S
Greenhorn

Joined: Sep 09, 2007
Posts: 2
Can anyone tell me which class impelments Resultset Interface? I have asked many ppl but couldn't find the answer to it.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

"radhika radhika",
Welcome to the JavaRanch.

We're a friendly group, but we do require members to have valid display names.

Display names must be two words: your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with invalid display names get deleted, often without warning

thanks,
Dave
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Welcome to the beauty of Interfaces!

We don't immediately know and should not need to know the implementing Class for the interface. The Driver for the Database manages that for us and returns something that behaves like a ResultSet. We treat it like a ResultSet, and regardless of what exists behind the Interface should behave correctly.

You can always find the class using rs.getClass().getName() if you really need to know.
radhika S
Greenhorn

Joined: Sep 09, 2007
Posts: 2
Thankyou
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
When you do that ... Looking at the class name, do you think it will be the same for Oracle, UDB, MySQL and every other database?


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14150
    
  18

radhika S - Your name is still not according to the JavaRanch naming policy.

Your second name should not consist of only initials, such as "S". Please use a real-sounding name as your second name.

Please read the naming policy carefully and change your display name again.

Jesper Young - Bartender


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: which class implements Resultset