Blob data edit / add problem
Posted: 19.01.2006, 17:07
Please look at the code. I'm trying to insert a record with blob data (actually a TMemoField). I get an error after the "Post' Command
T.Insert;
try
T.Edit;
MS := T.CreateBlobStream(T.FieldByName('Description'), bmWrite);
Description.SaveToStream(MS);
T.FieldValues['ID'] := ID;
T.FieldValues['Number'] := Number;
T.FieldValues['Name'] := Name;
T.FieldValues['Done'] := Done;
T.FieldValues['DateStarted'] := DateStarted;
T.FieldValues['DateEnded'] := DateEnded;
T.FieldValues['PhotoGroup'] := Photos.GiveID;
T.Post;
except
on Exception do;
end;
Any help would be welcome!
T.Insert;
try
T.Edit;
MS := T.CreateBlobStream(T.FieldByName('Description'), bmWrite);
Description.SaveToStream(MS);
T.FieldValues['ID'] := ID;
T.FieldValues['Number'] := Number;
T.FieldValues['Name'] := Name;
T.FieldValues['Done'] := Done;
T.FieldValues['DateStarted'] := DateStarted;
T.FieldValues['DateEnded'] := DateEnded;
T.FieldValues['PhotoGroup'] := Photos.GiveID;
T.Post;
except
on Exception do;
end;
Any help would be welcome!