Using Sql server 2005
You must call the stored procedure with many parameters and one that is the image column that is used for the word document. I cannot change the database, since it is not under my control. I can not show the result of openrowset for the variable as I get
"Text, ntext, and image data types are not valid for local variables."
What is workround.
Below is the code that cannot make it work.
DECLARE BinaryContent image SET @BinaryContent=(SELECT BulkColumn FROM OPENROWSET(BULK N'C:\mydoc.docx', SINGLE_BLOB) blob EXEC [dbo].[InsertWordDocument] @Id = NEWID, @Name = N'DocName', @Description = N'DescriptionToChange', @BinaryColumn =@BinaryContent
How can I do the above work?
Thank you very much
source share