• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
author & internet detective
Marshal
Posts: 37708
576
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Author and ninkuma
Marshal
Posts: 66350
155
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then why do you feel a need to delete the resultset?
 
Ranch Hand
Posts: 156
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!