Meaningless Drivel is fun!*
The moose likes Java Micro Edition and the fly likes problem with read records in RMS after delete Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "problem with read records in RMS after delete" Watch "problem with read records in RMS after delete" New topic
Author

problem with read records in RMS after delete

Charline Louis
Greenhorn

Joined: Dec 15, 2008
Posts: 11
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

Joined: Jul 15, 2007
Posts: 14
Hi,

you can catch that exception and continue reading next record
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15665
    
  15

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with read records in RMS after delete
 
Similar Threads
deleting a record along with the child record
Data.delete(), ...
recNo choice
After deleting 14 records, application hanging
plz help