Topic: Retrieve image from database and put into gridview column
Hello Dmitry,
Do you have any sample code for retrieving an image from a database and saving it to disk so it can be loaded into a gridview?
Thanks!
MAK
My Visual Database → Script → Retrieve image from database and put into gridview column
Hello Dmitry,
Do you have any sample code for retrieving an image from a database and saving it to disk so it can be loaded into a gridview?
Thanks!
MAK
Master Dmitry, Post : Picture in a grid
link http://myvisualdatabase.com/forum/viewtopic.php?id=1235
Download Grid With Image http://myvisualdatabase.com/forum/misc. … download=1
Thanks for your post prahousefamily, but that's not what I want to do.
I need to retrieve an image from a database (storedfile) and save it to disk.
Thanks!
MAK
Hello,
An example, how to save file to disk
procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
var
s: string;
begin
s := SaveFileFromDataBase('tablename', 'fieldname', Form1.TableGrid1.dbItemID); // save file to disk and get filename in system temp folder
OpenFile(s); // open file
CopyFile(s, 'd:\'+ExtractFileName(s)); // copy the file to disk d:\
end;
Thanks Dmitry!
That's exactly what I was looking for.
MAK
My Visual Database → Script → Retrieve image from database and put into gridview column
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi