0

I'm trying to read data from an old application and one of the fields is stored as an image data type in MS SQL Server. I have a feeling it is XML data stored as an image. Any ideas how to convert it?

Here is an example:

0xBB010000313035340000000000000000000000000000000000000000000000000000000000010000000000000000A084400000000000F09E40384100000000000000000000000000000000000000000000000000000000000000000000000000000000000054455841532053454354494F4E00000033320000000000000000000000000031380000000054265020525220434F000000000000000000000000000000000000000000000000334E00000000000000000000000000005345433A313820424C4B3A3332205352563A54265020525220434F204142533A31303534202F2031393830204653203636302046452054455841532053454354494F4E202F205343414C45445F464F4F54202F20524547554C41544F5259000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Irvo
  • 131
  • 1
  • 1
  • 4

1 Answers1

0

Actually, your string is a flat db record stored as a hex data type. If you google 'convert hex to string' and paste in your sample, you will see the record.

What you need to do is convert the string to byte[] array, and then you can convert the byte[] array into a string.

See the following question for tips on how to do that: Converting from hex to string

Cheers!

JakeMc
  • 413
  • 6
  • 13