Displaying <binary data>
-
How can I view the contents of a record if the data is stored as "<binary data>"? Stored procedure? Some sort of cast? Help!
Presentation of the data is not the function of the database engine. When you query it in a .NET application you get a byte array (byte[]) back. How you interpret that is entirely up to you. If you view the data in the SQL Server Management Studio it will show up as HEX - However that is a function of the Management Studio presenting the data to you. If you attempt to cast it to a VARCHAR, for example, you will get a variety of characters that will not mean much unless the binary was text to begin with.
Recent blog posts: *SQL Server / Visual Studio install order *Installing SQL Server 2005 on Vista *Tip of the Day - SysInternals * Meme My Blog
-
Presentation of the data is not the function of the database engine. When you query it in a .NET application you get a byte array (byte[]) back. How you interpret that is entirely up to you. If you view the data in the SQL Server Management Studio it will show up as HEX - However that is a function of the Management Studio presenting the data to you. If you attempt to cast it to a VARCHAR, for example, you will get a variety of characters that will not mean much unless the binary was text to begin with.
Recent blog posts: *SQL Server / Visual Studio install order *Installing SQL Server 2005 on Vista *Tip of the Day - SysInternals * Meme My Blog