Page 1 of 1

Blob problem

Posted: Fri 05 Oct 2007 01:12
by Alberto_213
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!
Alberto.

Posted: Mon 08 Oct 2007 08:46
by Antaeus
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.