Here is my code:
msPic := TMemoryStream.Create;
s := y.Result.pic;
if msPic.Size > 0 then
jpg := TJpegImage.Create;
msPic.Position := 0;
dbiPhoto.Width := Round(dbiPhoto.Height * jpg.Width / jpg.Height);
This works fine. dbiPhoto though, is a TDBImage, and I want it to save it to the database.
How do I do it?
Obviously, it has to be in edit mode and such. I have tried many things but nothing worked.
So basically, the question is. How do I go from my JPEG into the database for display in the TDBImage component at a later (and current) time? I can easily make it do:
jpeg.savetofile and tdbimage.loadfromfile, but I want to do it from a stream. I am beginning to think it is impossible.
You need more points, just let me know.