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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How to put pdf file into varbinary (max)
 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

2242 Posts

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

Go to Top of Page
  Previous Topic Topic Next 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.02 seconds. Powered By: Snitz Forums 2000