posted 20 years ago
Hi Anand,
I've got URLyBird 1.2.1 and it seems very comparable to yours as far as recNos and primary are concerned.
The recNo. As Data uses a fixed-length record format, recNo is just the basic information you need to compute where a given record must be read from / written to the file. After having read the file header while opening the file, you may store the file position (begin of data section of the file) in some long variable (I called it dataOffset). Afterwards, to read or write a record, you just need to use the right position within the file, using this simple formula : dataOffset + (recNo - 1) * recordLength. With URLyBird 1.2.1, it's impossible to define a primary key on the only table we use - even a compound one, Max - because the application we write must accept duplicate rooms (there is no room number, so we cannot distinct two different rooms / same hotel / same date / same location / same smoking status while we must be able to store multiple such records in the database). So OK, we don't need a primary key in the only table we'll use, but Data must be able to handle an optional one. In other words, I've added support for such a primary key, but I let it null for our given database.
Regards,
Phil.