Page 1 of 1

TMSQuery in SDAC 3.70

Posted: Tue 24 Jan 2006 13:41
by henrikkehm
Hi,

I am evaluating SDAC 3.70 beta for BDS 2006. I have a problem, when saving Images to the Database. The following code produces an Access Violation in MSQuery1.ParamByName('P1').LoadFromStream(...)

Code: Select all

MemoryStream := TMemoryStream.Create;
imgWriteBLOBs.Picture.Graphic.SaveToStream(MemoryStream);
MSQuery1.SQL.Text := 'update graphics set picture = :P1 where graphics_id = 1'
MSQuery1.ParamByName('P1').LoadFromStream(MemoryStream, ftGraphic); //Bang
MSQuery1.Execute;
MemoryStream.Free;
(I removed try..finally and try...except for code clarity here)

The above code works fine with BDE, ADO even with DBExpress, but with the SDAC Components I get the mentioned AV. Is there a fundamental Error in my code, or is it a Beta issue ? It works fine, when I set the BlobType to ftBLOB.

Thanks
Henrik

Posted: Wed 25 Jan 2006 15:38
by Ikar
We do not support ftGraphic data type. Use ftBlob instead of ftGraphic.