Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 29, 2013 07:13 PM by kartmcad
Jan 29, 2013 07:13 PM|LINK
I need to convert a value coming from DB via ExecuteReader (which is a SqlDBType.Binary) to String.
Since, I am trying to save that value in a HashTable.
But everytime, I am getting System.Byte stored in the HashTable.
Here is the value I am getting from DB "0000000000000000000000000A010101"
I have tried the following ways but still not working.
byte val = Convert.ToByte(reader.GetValue(1));
byte binaryData = reader;
string text = Encoding.UTF8.GetString(binaryData)
Please help me in resolving the issue.