Blob problem
Posted: 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!
Alberto.
...
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.