Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Update RecordStore

 
Goran Markovic
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I was wondering is there an option to do update of the RecordStore, without deleting all it data first.
Example : I have some data in the RecordStore. The data has been retrieved and and changed (some modified, some changed). In order to reflect changes in the RecordStore, as much as I figure out, I must first delete all data, and then populate RecordStore with my data. If I do not do that way, deletion or modification of some data won't be reflected.
Deleting all data from the database, on any change, is expensive for me.

Anybody any suggestion about this?

Thanks in advance
 
Soumya Rout
Ranch Hand
Posts: 49
Java Java ME Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Updating a particular record involves getting a handle for that record and setting new information.



returns the data stored in the given record in the byte array represented by buffer.

returns a copy of the data represented by recordId.

sets new information,

a stream of bytes (newData) with offset as its starting index and numBytes as its length,
at the record location represented by recordId.


 
Goran Markovic
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Soumya,
that solution include Id tracking of particular record, which are constructed as an objects after retrieval. But even in that case, it is not good solution (at least not best for now) because, I must check about id event the objects which are deleted, just as about new objects, I am attempting to add into RecordStore. That means, I always must perform comprehensive check of list of objects for changes... I believe it will take almost the same time for checking each object from the list to see is it changed, deleted or some new is added, and then if so (let say 90% got modified), I need to save it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic