• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with read records in RMS after delete

 
Charline Louis
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

the problem is, ex: i have 3 records, then i delete the 2nd record, after that, when i read again i got an error javax.microedition.rms.InvalidRecordIDException, and it's because of the recordID of the 2nd record has been deleted.

i want to know if there's a way to skip reading the 2nd record..

Thanks
 
sivakumar arani
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

you can catch that exception and continue reading next record
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18098
50
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm rusty on that. In a regular SQL query, the way to skip it would either be to do like sivakumar says and handle the exception or to re-issue the query, which would cause a new resultset (minus the deleted record) to be built.

In RMS, there's a deleted record flag, so you might be able to check that and avoid actually throwing an exception. Like I said, I'm rusty on RMS, so I don't know if that's possible. But you can definitely use exception trapping to get beyond it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic