Questions tagged [cachedrowset]
57 questions
15
votes
4 answers
Implementations of RowSet, CachedRowSet etc
Until today I was working with ResultSet when handling results from queries. But today I read a little about RowSet and CachedRowset and I realized they can serve my purposes better. While in all the examples I read where RowSet and CachedRowSet…

Bennyz
- 623
- 2
- 18
- 36
15
votes
3 answers
Are there any good CachedRowSet implementations other than the proprietary Sun one?
I am investigating using javax.sql.rowset.CachedRowSet in part of my application, however I can only find information on using the proprietary sun implementation com.sun.rowset.CachedRowSetImpl or Oracle specific implementations.
The sun…

BenM
- 4,056
- 3
- 24
- 26
12
votes
4 answers
CachedRowSetImpl cannot be resolved to a type
I'm using CachedRowSet to hold the ResultSet form DB.
According some demo code:
I write below code:
CachedRowSetImpl crs = new CachedRowSetImpl();
But eclipse prompt me that CachedRowSetImpl cannot be resolved to a type.
So I know I need to import…

roast_soul
- 3,554
- 7
- 36
- 73
10
votes
7 answers
How do I check to see if a column name exists in a CachedRowSet?
I am querying data from views that are subject to change. I need to know if the column exists before I do a crs.get******().
I have found that I can query the metadata like this to see if a column exist before I request the data from…

WolfmanDragon
- 7,851
- 14
- 49
- 61
7
votes
3 answers
CachedRowSet: can it still be used to hold ResultSet data?
I would like to write a java function that takes in a SQL query and returns a ResultSet for processing elsewhere. This can't be done as a ResultSet is dead once the connection is closed.
Googling around I found a VERY OLD (2004) OReilly article…

Steve
- 3,127
- 14
- 56
- 96
4
votes
1 answer
Caching ResultSet
Its more like subjective question, The main objective of the question is to Cache java.sql.ResultSet. But I know it is not preferred mechanism as it is tightly coupled with Connection, and data may get flushed when the connection is closed. To…

Satheesh Cheveri
- 3,621
- 3
- 27
- 46
3
votes
4 answers
CachedRowSet slower than ResultSet?
In my java code, I access an oracle database table with an select statement.
I receive a lot of rows (about 50.000 rows), so the rs.next() needs some time to process all of the rows.
using ResultSet, the processing of all rows (rs.next) takes about…

ben_muc
- 211
- 3
- 6
3
votes
1 answer
Why NoClassDefFoundError for com/sun/rowset/CachedRowSetImpl in Wildfly?
My operating system is Windows 7 64-bit. I am working with Eclipse Luna. I am exploring migration from JBoss 4.2.3 to Wildfly 8.2.1.
I created a simple web app to test out com.sun.rowset.CachedRowSetImpl which I believe is part of JDK.
I created a…

srh
- 1,661
- 4
- 30
- 57
3
votes
2 answers
Caused by: java.lang.ClassCastException: java.sql.Timestamp cannot be cast to java.sql.Date
I am getting the below given error for the following code snippets:
try {
cRows = new CachedRowSetImpl();
while(cRows.next())
{
MyClass myClass = new MyClass();
…

Nidheesh
- 4,390
- 29
- 87
- 150
3
votes
1 answer
Should I always close a CachedRowSet even if it goes out of scope?
Consider the following code snippet:
public void getUsers() {
CachedRowSet rowSet = new CachedRowSetImpl();
......... /* Initialize the rowset */
String query = "SELECT user_id FROM users";
rowSet.setCommand(query);
…

Rafi Kamal
- 4,522
- 8
- 36
- 50
2
votes
1 answer
Should we use insertRow() with acceptChanges()?
Here is a sample code in java:
try {
/* create connection */
Connection conn = DriverManager.getConnection(url, username, password);
Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,…

Majid Azimi
- 5,575
- 13
- 64
- 113
2
votes
1 answer
ResultSet to CachedRowSet
I'm trying to convert from ResultSet to CachedRowSet/CachedRowSetImpl. The ResultSet seems to be empty after the populate method, but so does the CachedRowSet. I have been searching all over the place, trying different approaches (including…

ArthurP
- 117
- 1
- 2
- 10
2
votes
1 answer
How to process 250K records in ResultSet in multithreading or any other faster way?
Currently my SQL resultSet brings around 250K records and which needs to be processed. It is taking 25 secs to complete the process. I am planning to do the Multithreading on it. But couldn't split the data from the ResultSet. When googling it says…

gkarthiks
- 471
- 6
- 17
2
votes
2 answers
Updating RowSet if table content is changed?
Is it possible to update/refresh a RowSet's in case the table content is changed (for e.g. another application modifies it)? So this way I 'always' have an up-to-date version of the table.
I looked into RowSetListener, but these events seem to get…

Daniel Szalay
- 4,041
- 12
- 57
- 103
2
votes
2 answers
Failed on insert row using CachedRowSet
I am using CachedRowSetImpl , I can get data from Database , BUT I can not insert .
this is the Code :
public class NewClass {
static final String DATABASE_URL = "jdbc:derby://localhost:1527/TaskDB;create=true";
static final String…

Moe
- 21
- 1
- 3