Q: How do I read and write binary files?
A: If the data can be stored in its binary form, it's as simple in Delphi as it was in BP7:
type
TUserNotes = record
TimeStored : TDateTime;
Comment : string[20];
TaxCost : real;
NetCost : real;
Altered : Boolean;
end;
TUserNotesFile = file of TUserNotes;
var
UserNotes : TUserNotes;
F: TUserNotesFile;
begin
System.Assign(F,'MYDATA.DAT');
Rewrite(F);
{ fill in the fields of "UserNotes" }
Write(F,UserNotes);
Close(F);
end;
{This code came from Lloyd's help file!}