How to save jpg image to database and then load it in Delphi using FIBplus and TImage? -


how save jpg image database , load in delphi using fibplus , timage?

var   s : tmemorystream; begin   s := tmemorystream.create;   try     tblobfield(adoquery1.fieldbyname('imagefield')).savetostream(s);     s.position := 0;     image1.picture.graphic.loadfromstream(s);       s.free;   end; end; 

if using jpeg images, add jpg unit uses clause of unit file.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -