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;
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.