|
Post by ivartyn on Jan 31, 2007 10:00:22 GMT
Hi All, I'm writing a program that creates a file (Direct Access). I want users to be able to edit a record in the file e.g. Firstname. and also delete an entire record. I've written the code for sorting and searching the file. This works fine. So only the two remaining part left to complete Thanks for the assistance.
|
|
buff1
New Member
Posts: 3
|
Post by buff1 on Feb 3, 2007 2:14:00 GMT
QB doesn't have Direct Access at least in the sense of THEOS direct files but they do have random access files (at least that's what they are called). These are accessed by record number and require fixed length records. Editing this kind of file is easy, simply choose the record number, display the fields, edit the fields and rewrite (put) the record back to the same record number.
Deleting a record is simply rewriting the file with all but the deleted record.
What I have done in file maintenance is mark the record as 'to be deleted' in some way, then when the maintenance session is finished rewrite the file at that point leaving out the records to be deleted and assigning new record numbers in the process.
|
|
|
Post by ivartyn on Feb 6, 2007 17:46:24 GMT
Thanks buuf1 for the help. I've succeeded in writting the code for deleting and editing a record. I've got one more question which I'll post as a new thread.
|
|