• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Update RecordStore

 
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 49
Netbeans IDE Java ME Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic