locked
Can't display varbinary data RRS feed

  • Question

  • Hi folks,
      I'm using SSMS Express 2005 and have what I think is a simple question, but after much surfing haven't yet been able to find an answer.
      I have an existing table, one of the columns is defined as varbinary(128), not null, and holds a variable amount of data (converted from incoming packets of byte data). Whenever I try to view the fields from SQL Express, either by opening the table or by executing a query, the data always displays as "<Binary data>". Ideally I'd like to view it as hex data, but I haven't been able to display anything other than by doing a cast to varchar which displays garbage (as expected I guess).
      Perhaps I've been searching with the wrong question or am just not getting something, as I would think this would be an easy thing to do.
      Any pointers would be greatly appreciated.

    Thanks,
     Jim
    Monday, March 2, 2009 9:07 PM

Answers

  • Jens, thank you for the response.
      Before I got a chance to try it, a colleague said that he had no problem viewing the data. Sure enough, he could. What he was doing was executing a query directly on the database (click on the database, right click->new query) while I was opening the table (right clicking->open table), then in the table view opening a SQL pane and executing the query. 
    Same SQL query, but different context, as the first query shows the data in the varbinary column as hex, while the latter shows it as <Binary data>.

    I did not know it would do that.

    Thanks again for your help.
    Regards,
     Jim
    • Marked as answer by JimIPS Tuesday, March 3, 2009 5:21 PM
    Tuesday, March 3, 2009 5:20 PM

All replies