2
Tech Writer 2.2k 1.6m 22y Hi Herbia53,
Are you getting the value back as a SqlBinary type (one of the SqlTypes) in your DataSet? If so, this is converted by C# in a byte[] array. To convert from a byte array to a string, you can use the AscIIEncoding method GetString shown below:
Converts a specified range of elements in an array of bytes to a String.
[C#]
[Serializable]
public override string GetString(
byte[] bytes,
int byteIndex,
int byteCount
);
byteIndex - The index of the first position in bytes to convert.
byteCount - The number of bytes to convert.
Return Value - A String containing the values of the range in bytes from byteIndex to
byteIndex + byteCount decoded as an ASCIIEncoding.
-Mike G.