I am trying to load/display jpg images (since this is existing data at many sites, and the graphic formats are in jpg), but can’t display them, once the dataset is closed.
Since the standard dbimage component does not work with jpg (at least I can’t make it work), I can't recreate for testing without using devexpress components, which loads it and displays it up until the table is closed and re-opened.
Any ideas?
sDac 4.30.0.12 and jpeg images
sDac 4.30.0.12 and jpeg images
Last edited by ccmcbride on Thu 11 Oct 2007 17:10, edited 1 time in total.
I have implemented the code that loads it to the database, and displays to a timage when scrolling.
It works fine, until I close and re-open the table.
Once I close and reopen, I get a jpeg error #51.
My code :
procedure TForm1.ShowBlob;
var
jpg : TJpegImage;
blob : Tblobfield;
begin
blob := tBlobField(tblDataPHOTO);
if blob.BlobSize > 0 then
begin
jpg:= TJpegImage.Create;
jpg.Assign(blob); ---------> jpeg error #51
image1.Picture.Graphic := jpg;
jpg.Free;
jpg := nil;
end //of showing blob
else
image1.Picture.Graphic := nil; // no picture - clear the Timage
end;
It works fine, until I close and re-open the table.
Once I close and reopen, I get a jpeg error #51.
My code :
procedure TForm1.ShowBlob;
var
jpg : TJpegImage;
blob : Tblobfield;
begin
blob := tBlobField(tblDataPHOTO);
if blob.BlobSize > 0 then
begin
jpg:= TJpegImage.Create;
jpg.Assign(blob); ---------> jpeg error #51
image1.Picture.Graphic := jpg;
jpg.Free;
jpg := nil;
end //of showing blob
else
image1.Picture.Graphic := nil; // no picture - clear the Timage
end;
I could not reproduce the problem.
Please send me a complete small sample at sdac*crlab*com to demonstrate it, including a jpeg image and script to create the table.
Also supply me the following information:
- exact version of SDAC. You can see it in the About sheet of TMSConnection Editor;
- exact version of your IDE;
- exact version of SQL Server and client. You can see it in the Info sheet of TMSConnection Editor.
Please send me a complete small sample at sdac*crlab*com to demonstrate it, including a jpeg image and script to create the table.
Also supply me the following information:
- exact version of SDAC. You can see it in the About sheet of TMSConnection Editor;
- exact version of your IDE;
- exact version of SQL Server and client. You can see it in the Info sheet of TMSConnection Editor.