Ich streame so etwas in ein Binärfeld in der Datenbank.
Speichern:
Delphi-Quellcode:
...
ms:TMemoryStream;
...
ms:=TMemoryStream.Create;
DBGrid1.Columns.SaveToStream(ms);
ms.Position:=0;
TBlobField(tbSettings.FieldByName('Data')).LoadFromStream(ms);
tbSettings.Post;
Laden:
Delphi-Quellcode:
...
ms:TMemoryStream;
...
ms:=TMemoryStream.Create;
TBlobField(tbSettings.FieldByName('Data')).SaveToStream(ms);
ms.Position:=0;
DBGrid1.Columns.LoadFromStream(ms);