Topic 6_slide Notes
Topic 6_slide Notes
Format:
rsVariable.deleteRecordStore();
e.g.
rs.deleteRecordStore ();
Note:
Page 8 of 15 Dr. Mwakondo PhD (Computer Science) UoN
a. Adding Record
To add a record in an existing recordstore two things
must be done:
Create the data
Convert the data into byte array
Page 11 of 15 Dr. Mwakondo PhD (Computer Science) UoN
Format:
Datatype Variable = dataValue;
Byte[] data = Variable.getBytes();
int RecordID = rsVariable.addRecordS (data,
startindex,endindex);
e.g.
String myname = “Fullgence Mwakondo”;
Byte[] recordData = myname.getBytes();
Int RecordID = rs.addRecord(recordData,0,
recordData.length);
b. Retrieving Record
To retrieve a record in an open recordstore supply the
record id to the getRecord method of the recordstore.
Page 12 of 15 Dr. Mwakondo PhD (Computer Science) UoN
b. RecordComparator
c. RecordEnumertion