>>>>Hi,
>>>>
>>>>I am using FileStream in my SQL Server 2008 R2 database to store a PDF. I use this code:
>>>>
>>>>
UPDATE Claims
>>>> SET clm_Scan = CONVERT(VarBinary(max), N'MyFileName.pdf')
>>>> WHERE clm_PK = 'MyPK'
>>>>
>>>>I want to let the user now view the PDF, so I query the clm_scan field then use STRTOFILE() to create the file oon my disk, but when I try to open the PDF I get a message that "Adobe Reader could not open the file because it is either not a supported file type or because the file has been damaged..."
>>>>
>>>>Am I doing this right?
>>>
>>>Your update statement doesn't look correct already. You're just converting the name of the file.
>>>
>>>Check
http://www.kodyaz.com/articles/display-database-image-using-sql-server-2008-reporting-services.aspx>>>
>>>Although, may be I'm wrong as BOL shows the exact same syntax
>>>
>>>
BOL reference>>
>>Thanks Naomi,
>>
>>Dan's syntax is what I was looking for.
>
>If that's the case, I posted it in the link I gave you.
Maybe so, but I couldn't find the UPDATE syntax in your links. I already had the INSERT syntax, but couldn't convert it to an UPDATE.