Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get Record ID in RMS

 
Harish Tiruvile
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • 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
 
Theodore Casser
Ranch Hand
Posts: 1902
Hibernate Netbeans IDE PHP
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic