Link to home
Start Free TrialLog in
Avatar of Vaalar
Vaalar

asked on

Blob field and saving picture in file

Hi,
I`ve got problem with saving picture from JvDBImage to file on hdd. I`m showing the picture on the form and i would like to be able to save it with onclick event, in directory of my choice.
Here is my select from db:

Add('SELECT ID, T_NO, PICTURE, DATE_TIME FROM REC WHERE ID = :p2');
    Params.ParamByName('p2').AsInteger:=picture_max;

Best Regards
Vaalar
Avatar of senad
senad
Flag of Slovenia image

Never used JvDBImage but devexpress image component has rightclick option -save as - (then savefiledialog opens).So if JvDBImage has no that option then you would have to program the whole thing (on rightmouse click- opendialog-etc...)
ASKER CERTIFIED SOLUTION
Avatar of SteveBay
SteveBay
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Your Q confuses me. Are you having problems saving the picture in the visual component JvDBInmage to a file in some directory on your hard drive? Or are you having other problems in getting the image directly from your database to a file on the harddrive?

The JvDBImage has a procedure to savetofile such as:

JvDBImage1.Picture.SaveToFile(SaveDialog1.FileName)

If you need a function to save a database blob field which contains an image via streams to a file, or directly from your database, let us know. But Steve Bay's should work just fine!

john
Avatar of Vaalar
Vaalar

ASKER

And it works perfect :)
Thx for help