Hi there, I am working on B&S database. There are some confusions and which I want to discuss there. In database interface, find method has description like:
// Returns an array of record numbers that match the specified // criteria. Field n in the database file is described by // criteria[n]. A null value in criteria[n] matches any field // value. A non-null value in criteria[n] matches any field // value that begins with criteria[n]. (For example, "Fred" // matches "Fred" or "Freddy".) public int  find(String  criteria) throws RecordNotFoundException;
Could anybody please explain this �criteria� further? What is record number? Is it index of record in file because apparently there is no key field in record and I must not add or remove any field because of compatibility with existing data?
In the same interface, delete method has description like this: // Deletes a record, making the record number and associated disk // storage available for reuse. public void delete(int recNo) throws RecordNotFoundException
But in database file format description, it is written that records are not deleted physically they are only marked as deleted (00 implies valid, 0xFF implies deleted). This is really confusing!! Please help!!
Joined: Aug 03, 2002
Can I suggest that you spend some time (some people spend a few weeks) browsing back through earlier topics in this SCJD forum. I'm quite sure your questions have already been answered.