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
 General SQL Server Forums
 New to SQL Server Programming
 View binary data

Author  Topic 

Pinto
Aged Yak Warrior

590 Posts

Posted - 2011-07-06 : 06:48:02
I have a sql table with a field MyImage, type image. If I list the table the content of MyImage shows as <binary> This field should hold the path to a picture on a server.
How can I view what it has put in this field in this format Myserver\Photos\Photo1.jpg

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2011-07-06 : 06:58:07
Copy the url/path to the address bar in internet explorer and press enter.


N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

Pinto
Aged Yak Warrior

590 Posts

Posted - 2011-07-06 : 07:02:09
All it shows is <Binary data> and does a search on that when I press return.

Sorry , but I incorrectly said the field showed as <binary> it was actually <Binary data>
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2011-07-06 : 07:53:20
SELECT CAST(MyImage AS VARCHAR(MAX)) FROM dbo.Table1 WHERE Col1 = 999



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

Pinto
Aged Yak Warrior

590 Posts

Posted - 2011-07-06 : 08:00:42
I get an error
explicit conversion from data type image to varchar(max) is not allowed

I a using SQL 2008
Go to Top of Page
   

- Advertisement -