Does anybody know how to view the contents of fields containing binary data in an MS SQL Server 2005 database?
Right-click the Products table in SQL Server Object Explorer, and select View Data. The Data Editor launches. Notice the rows we added to the table in previous procedures. Right-click the Fruits table in SQL Server Object Explorer, and select View Data.
To read BLOB data, you need to use the SqlDataReader class of ADO.NET. The use of SqlDataReader class to read BLOB data can be best understood with an example. You will develop a simple application that manages photos stored in a SQL Server database.
Binary, Varbinary & Varbinary(max) are the binary string data types in SQL Server. These data types are used to store raw binary data up to a length of (32K – 1) bytes. The contents of image files (BMP, TIFF, GIF, or JPEG format files), word files, text files, etc. are examples of binary data.
Depends if it is just text stored as binary or not, if it is then take a look at this
create table #bla (col1 varbinary(400))
insert #bla values(convert(varbinary(400),'abcdefg'))
select col1,convert(varchar(max),col1)
from #bla
output 0x61626364656667 abcdefg
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With