Display System.Byte[] text data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This field is bound to a image data type in SQL server that is used to house
big amounts of text how can I output the text data because right now I am
getting

System.Byte[]
 
smilly said:
This field is bound to a image data type in SQL server that is used to house
big amounts of text how can I output the text data because right now I am
getting

System.Byte[]

Well, Image is a type for binary data. How are you converting the text
into a binary form in the first place? If you're using an Encoding, use
the same Encoding in reverse to get back to a string.
 
I am using Delphi 6 using ADO to store the data we are in conversion to a
thin client what path should I take to get the data out?

Jon Skeet said:
smilly said:
This field is bound to a image data type in SQL server that is used to house
big amounts of text how can I output the text data because right now I am
getting

System.Byte[]

Well, Image is a type for binary data. How are you converting the text
into a binary form in the first place? If you're using an Encoding, use
the same Encoding in reverse to get back to a string.
 
smilly said:
I am using Delphi 6 using ADO to store the data we are in conversion to a
thin client what path should I take to get the data out?

You'll need to find out exactly what conversion Delphi or ADO is
making, I'm afraid. Hopefully it's just a normal text encoding. I
suggest you try a few sample strings from Delphi and see how they come
out - look at the binary data and try to work out what encoding it is.
For instance, if every other byte is a 0, chances are it's a UCS-2 or
UTF-16 encoding.
 
Back
Top