SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How to put pdf file into varbinary (max)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

31 Posts

Posted - 01/15/2013 :  19:56:35  Show Profile  Reply with Quote
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.


Flowing Fount of Yak Knowledge

2241 Posts

Posted - 01/16/2013 :  03:22:05  Show Profile  Reply with Quote

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000