Blob problem

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 1
Joined: Fri 05 Oct 2007 00:56

Blob problem

Post by Alberto_213 » Fri 05 Oct 2007 01:12

Hi all. I'm using the MSSQL component with the next code:

MSSQL1.add("INSERT INTO planos(imagen) VALUES(:VImagen)")
ParamByName("VImagen").LoadFromStream(temp, ftblob))

Where "temp" is a TmemoryStream, and "imagen" is my data type "Image" field.

When I run the SQL, I get this error message: "Unknown datatype for param VImagen[0] = D (D:\Projects\Delphi\Sdac\Source\oledbaccess.pas, line 2371)

I tried to change my field data type "Image" to "Binary". I tried to change "ftblob" to "ftgraphic". I also tried to do this: ParamByName("VImagen").LoadFromFile("C:\imagen.jpg", ftgraphic), but I still get the same error message. What am I doing wrong?

Thanks in advance!

Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 08 Oct 2007 08:46

We could not reproduce the problem.
Please send me a complete small sample at sdac*crlab*com to demonstrate it, including script to create and fill table.

Also supply 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.

Post Reply