This message was edited by Phat Nat at 2003-3-10 17:23:37
This message was edited by Phat Nat at 2003-3-10 17:23:11
: i am using linked lists along with DirectAccessFiles, but when i save i get a repition of the previous data along with the new data that i added.below is my save procedure :
:
: Procedure Savelist(firstpointer:listpointer;var cfile:cusrec);
: var
: currentpointer:listpointer;
: Begin
: assign(cfile,'C:\Dbase\Vehicles.dat');
: rewrite(cfile);
: currentpointer:=firstpointer;
: WHILE currentpointer <> NIL DO
: begin
: write(cfile,currentpointer^.custfield);
: currentpointer:=currentpointer^.nextfield
: end;
[\code]
I don't know what type of file you are using (cusrec), but if it is not text, remember to use REWRITE(CFILE,1); If it is text, then it looks as though you're problem is elsewhere.
Phat Nat