Question

I am working on J2ME Record Stores and when i delete the contents successfully, and then i check it, it gives me the correct count which is zero. But when i insert again, it gives me error finding record exception, because it is inserting after the content that i had inserted before. It is inserting from 2 instead of 1.

Can anyone explain why is it happening that way?

Était-ce utile?

La solution

The record id in a recordstore is unique and auto-incrementing, just like a primary key in an SQL database. When 1 has been used, it cannot be used again. (Unless you delete the recordstore and create it again).

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top