Anna Kirova
asked on
How to save the image in the .cds File ClientDataSet?
In my .cds file I've ID->ftAutoInc and IMAGE field is ftGraphic.
Where I did mistake? It's not inserting into IMAGE field Plz help me!
Where I did mistake? It's not inserting into IMAGE field Plz help me!
procedure TForm1.btnAddImageClick(Sender: TObject);
var Stream:TMemoryStream;
begin
if OpenDialog1.Execute then
begin
Image1.Bitmap.LoadFromFile(OpenDialog1.FileName);
Stream:=TMemoryStream.Create;
Image1.Bitmap.SaveToStream(Stream);
cdsMenu.Insert;
// TBlobField(cdsMenu.FieldByName('IMAGE')).LoadFromStream(Stream);
cdsMenuIMAGE.Assign(Image1.Bitmap);
cdsMenu.Post;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.