title: image data types are invalid for local variables (using openrowset cannot make it work)
body: <p>Using Sql server 2005</p>
  
  <p>I need to call a stored procedure that has many parameters and one which is an image column that is used for word document. I cannot change database since it's not under my control. I cannot seem to set a result of an openrowset to a variable as I get </p>
  
  <p><code>The text, ntext, and image data types are invalid for local variables.</code></p>
  
  <p>What is a work around?</p>
  
  <p>Below is the code that cannot make it work.</p>
  
  <pre><code>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
  </code></pre>
  
  <p>How can I make the above work?</p>
  
  <p>Many thanks.</p>