Help on how to insert/delete a record in a file

 
I need to know how to insert a record to file, or to delete a record for that matter. More like database management. I used to think that FileSeek(Handle, 0, SEEK_CUR) would point to a position where a record would be written. But it does not point to any position. If the records were numbered, this would be easy (primary key for database management). Same goes with deleting a record. Thanks in advance.
 
The only way you can do this is opening a new file and writing all content of the original file into it, except the lines that should be deleted of course. Then close both files and replace the old file with the new one.
 
Thanks friend. This is a good idea.
Reason: