[DUG] Images and MS SQL Server
Dave O'Brien
dave at ICCS.CO.NZ
Thu Aug 14 14:56:15 NZST 2008
I have worked out how to save an image into an Image field, but I'm
having brain fade on how to retrieve the image... Using TADOQuery,
D2005.
Save:
...
datamod.ADOU.SQL.Add(':Image)') ;
ms := TMemoryStream.Create ;
try
Image.Picture.Bitmap.SaveToStream(ms);
ms.seek(0,0) ;
datamod.ADOU.Parameters.ParamByName('Image').LoadFromStream(ms,
ftGraphic);
finally
ms.Free ;
end ;
datamod.ADOU.ExecSQL ;
Anyone (I suppose everyone has) got a way to get the image back?
Cheers,
Dave.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20080814/6fd7f0df/attachment.html
More information about the Delphi
mailing list