TMSQuery in SDAC 3.70

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
henrikkehm
Posts: 3
Joined: Tue 24 Jan 2006 13:05
Location: Hamburg, Germany

TMSQuery in SDAC 3.70

Post by henrikkehm » Tue 24 Jan 2006 13:41

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

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Wed 25 Jan 2006 15:38

We do not support ftGraphic data type. Use ftBlob instead of ftGraphic.

Post Reply