*
The moose likes JDBC and the fly likes How to delete a ResultSet row without deleting the underlying database row? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to delete a ResultSet row without deleting the underlying database row?" Watch "How to delete a ResultSet row without deleting the underlying database row?" New topic
Author

How to delete a ResultSet row without deleting the underlying database row?

James Hodgkiss
Ranch Hand

Joined: Jan 22, 2004
Posts: 401
Does anyone know how I can delete a ResultSet row without deleting the underlying database row?

The ResultSet docs say deleteRow() also deletes the row from the underlying database, so I'm hoping someone can suggest another way.

Cheers,
James
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31062
    
232

James,
A ResultSet is tied to the database. Normally, you make a copy if you just want to store the data locally. You could use a disconnected resultset (or rowset), but you would need to be very careful to never re-connect it because then the database would be affected.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

Then why do you feel a need to delete the resultset?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Anand Karia
Ranch Hand

Joined: Sep 25, 2004
Posts: 156

Hi James Hodgkiss

you question is not clear because if you dont want to delete row from database then why you need to do it. What is the reason? Because now i think by telling us your reason would help us to find the better way for you and solve your problem.


Love is GOD and GOD is Love.
Anand Karia
IT Concretor.......
M/s. Anand Karia Concreting IT
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to delete a ResultSet row without deleting the underlying database row?