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 How do I use the CacheRowSet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How do I use the CacheRowSet?" Watch "How do I use the CacheRowSet?" New topic
Author

How do I use the CacheRowSet?

John Riool
Greenhorn

Joined: Sep 24, 2007
Posts: 5
I am trying to use CacheRowSet but am getting �javax.sql.rowset.CachedRowSet is abstract; cannot be instantiated� on this statement: CachedRowSet crs = new CachedRowSet();

How do I fix this? Do I need to import something other than javax.sql.rowset.* ?

Sample Code:
import java.sql.*;
import javax.sql.*;
import javax.sql.rowset.*;
.
.
.
CachedRowSet crs = new CachedRowSet();

I am using Java 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03).
Michael Ku
Ranch Hand

Joined: Apr 20, 2002
Posts: 510
You need to use a class that extends CachedRowSet and is not abstract.
[ September 24, 2007: Message edited by: Michael Ku ]
John Riool
Greenhorn

Joined: Sep 24, 2007
Posts: 5
How do I find a class that extends CachedRowSet? I think it may be CachedRowSetImpl from com.sun.rowset.CachedRowSetImpl. But from what I can tell from searching Google, a class should be included in javax.sql.
Michael Ku
Ranch Hand

Joined: Apr 20, 2002
Posts: 510
John, I remember that this was a hard class to find when I looked at it over a year ago. It appears that it is still hard to find the impl class. I cannot remember where I found it. Try searching Sun or Apache sites for an implementation of CachedRowSet.
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Here's what I found: CachedRowSet. Fascinating reading; I've never looked into this before.


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
Michael Ku
Ranch Hand

Joined: Apr 20, 2002
Posts: 510
Stan, he needs an implementation of this class...
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
CachedRowSetImpl is referenced (but not linked) in the other doc. It's in rowset.jar in the RefrenceImplementation
Michael Ku
Ranch Hand

Joined: Apr 20, 2002
Posts: 510
Thanks Stan. I could not remember from where I downloaded it a few years aog. I think this is where I got it back then. Very BIG help
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I use the CacheRowSet?