Forum: Object-Pascal / Delphi-Language
Delphi
by mandoza,
28. Apr 2018
So many thanks for all your great efforts .
Forum: Object-Pascal / Delphi-Language
Delphi
by mandoza,
27. Apr 2018
many thanks for your great efforts , is there any other alternative to load just one field say :
myRec.LastName := ReadStringFromStream(LoadingStream);
let's update myRec.LastName with a new value
myRec.LastName := 'Wombat'; // to change
not the whole record
then save only this new field value , something like update then save whithout loading the whole record just the target one .
I...
Forum: Object-Pascal / Delphi-Language
Delphi
by mandoza,
27. Apr 2018
Thank you , i don't have an issue with LoadFromStream() and SaveToStream() , because i'll use my Rec else where , my issue now is with updating MyRec value then save it again ( at same stream position ) . thank you again
procedure UpdateMyRecLastName(NewLastName:string);
var
LoadingStream: TFileStream;
i, j: Integer;
myRec:Tmyrecord;
begin
SavingStream :=...
Forum: Object-Pascal / Delphi-Language
Delphi
by mandoza,
27. Apr 2018
what i wanted is to be able to :
1- Load that record item from Stream ( Done )
2- Update that record item value ( Done )
3- Update that modified record item value in the Stream , that means Replace that OLD item value with this New Value then save again ( HOW TO )
Forum: Object-Pascal / Delphi-Language
Delphi
by mandoza,
27. Apr 2018
Thank you , but what i wanted is to be able to update / delete items from my record then save / read again .
please read the
procedure UpdateMyRecLastName(NewLastName:string);
var
LoadingStream: TFileStream;
i, j: Integer;
myRec:Tmyrecord;
begin
SavingStream := TFileStream.Create('SAVE.test', fmCreate or fmOpenWrite or fmShareDenyWrite);
Forum: Object-Pascal / Delphi-Language
Delphi
by mandoza,
27. Apr 2018
Hi every one , i save my records into a stream i can read them back , but what i want is to be able to update or delete one of my records item then save back .
please how to do that . thank you
Tmyrecord = Record
Firstname : string ;
LastName:string;
ID : integer ;
end;