• Post Reply Bookmark Topic Watch Topic
  • New Topic

Deleting Rows of an Updateable ResultSet

 
Jeremy Hooie
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using an Updateable ResultSet to loop through records in the database and if a record's start date occurs before a certain date, I want to delete the record from the ResultSet and the database.

When the code hits the deleteRow() method, I get a "Degree of derived table does not match column list" SQLException. Any ideas?
Jeremy
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just wondering why you can't use the following code instead (doesn't seem to be a need for scrollable resultsets..)

Jamie
 
Jeremy Hooie
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can, I just wanted to familiarize myself with the Updateable ResultSet. I guess this is why I haven't done it before now.
Jeremy
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!