Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How to put pdf file into varbinary (max)

Author  Topic 

dainova
Starting Member

31 Posts

Posted - 2013-01-15 : 19:56:35
Hi, all
I'm on SQL 2008 and trying to do some testing so need to store some extenal .pdf into db column:

xData [varbinary](max) NULL

I tried to open sample.pdf in textpad and use this string to convert it, but it doesn't work, some special chars I think, do you think I need to convert it before sql?
This is just a sample how I tried to do conversion:
insert into sandbox.dbo.xSample (xData) values (cast ('0x1BC4002F279E2086944B' as varbinary(max)))

Appreciate your help.

Dai

bandi
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2013-01-16 : 03:22:05
Duplicate
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=182139

--
Chandu
Go to Top of Page
   

- Advertisement -