• 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 wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

how to get Record ID in RMS

 
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

In RMS is there any way to retrieve particular Record's record ID in a RecordStore.

for example::
I have created a RecordStore which will hold Names.After entering names into RecordStore if i want to modify a particular record i need RecordId allocated for that perticular Record...As we know that it is unpedictable to guess RecordID because it may not take 0,1,2,.....so on consecutive numbers as RecordID
 
Ranch Hand
Posts: 1906
3
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I suppose it really depends on how you're doing it.

You could always get a RecordEnumerator with an appropriate RecordFilter and RecordComparator to look through the RMS to find the one you're looking for. Or, if it won't be too ungainly, you can do what I did with one app, and keep a lookup table of the record IDs in your application (I did this due to the possibility of frequent updates of information, to spare myself having to write searches as I was doing it quick-and-dirty).

But no, you're correct that you can't assume that it's consecutive.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic