Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CachedRowSet

 
Arjunkumar Shastry
Ranch Hand
Posts: 986
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it true that Microsoft SQL server/driver does not support JDBC RowSet implmentation?
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont think that drivers are required to support it. There is a reference implemenation from Sun.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0406bhogal/

This article mentions that there in only one implementation of CachedRowSet. The package is javax.sql and not java.sql.

Looks like your database has millions of rows.
 
Arjunkumar Shastry
Ranch Hand
Posts: 986
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes,I am using the same but following lines of code give runtime error that Datasource can not be found.

There are two similar tables(with same columns).I want to fetch few records from one table and insert them into another table.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The thread subject says "CachedRowSet" by why are using JDBCRowSet ?
 
Arjunkumar Shastry
Ranch Hand
Posts: 986
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK how to insert rows using CachedRowSetImpl? I am comfortable with anyone.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put the stack trace here otherwise it is difficult to point out the error with the code snippet provided.
 
Arjunkumar Shastry
Ranch Hand
Posts: 986
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Error is at unknown datasource.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I seriously doubt if you can populate a cachedrow with result set of one table and update a another table.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the CachedRowSet API

An application can modify the data in a CachedRowSet object, and those modifications can then be propagated back to the source of the data.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic