Topic: DBImage load from script and save from script
Hello friends,
I have the following script, i want to load some values and an image, in my following test script the value is loaded but the image does not show up. According to sqlitestudio there is a blob value in the image field of the table (logo and logo filename have values). Does anyone see why the image is not loaded?
procedure frmMain_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
frmMain.Edit1.Text := SQLExecute('SELECT name FROM table where id = 1');
frmMain.DBImage1.LoadFromDatabase('table', 'logo', 1);
end;
Also, i am trying to update these values by script, in my following test script the text values are saved just fine, but the dbimage file does not update:
procedure frmMain_Button12_OnClick (Sender: TObject; var Cancel: boolean);
begin
SQLExecute('UPDATE table SET name="'+frmMain.Edit1.Text+'",logo = "frmMain.DBImage1.Picture" WHERE id= 1');
end;
Thanks in advance