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

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to get varbinary to .png
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

pushp82
Yak Posting Veteran

83 Posts

Posted - 10/10/2012 :  01:30:59  Show Profile  Reply with Quote
Dear all,

I have images in varbinary column and I need them in folder as .png. How to do this?

I tried BCP but could not succeed.

Please help! An immediate response would be applicable.
is it possible?

Thanks,

Edited by - pushp82 on 10/10/2012 01:37:05

chadmat
The Chadinator

USA
1974 Posts

Posted - 10/10/2012 :  02:07:38  Show Profile  Visit chadmat's Homepage  Reply with Quote
Look into Filestream.

-Chad
Go to Top of Page

pushp82
Yak Posting Veteran

83 Posts

Posted - 10/10/2012 :  04:51:28  Show Profile  Reply with Quote
I did the job by BCP command:

DECLARE @Command NVARCHAR(4000)
SET @Command = 'bcp "SELECT PictureBinary FROM mcdonaldswosbkup.dbo.TABLE WHERE TABLEID = ' +convert(VARCHAR,82) + '" queryout "c:\Temp\Images\' + 'test.png' + '" -T -n -SSERVERNAME'
PRINT @Command -- debugging
EXEC xp_cmdshell @Command
Go to Top of Page

pushp82
Yak Posting Veteran

83 Posts

Posted - 10/10/2012 :  05:21:05  Show Profile  Reply with Quote
I did the job by BCP but it is just creating an icon of no image any solution guys???
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.06 seconds. Powered By: Snitz Forums 2000