As Ak

As Ak

  • NA
  • 65
  • 7.6k

System.Byte[] displayed

Oct 10 2020 9:16 AM
I've a code on fetching a binary data from the database. But the values displayed is System.Byte[] instead of actual data which is a hexadecimal number, 0x1016FFFF.
 
How can i fix this problem?
 
This is my code at the moment;
 
//this string SNE will get the data from the text file
string SNE = data["End_Rg"];
query = "SELECT Start_Range, End_Range, Status FROM Range WHERE CONVERT(varchar(10), End_Range,2) LIKE '%" + SNE + "%'";
sqlcmd = new SqlCommand(query, cnn);
readData = sqlcmd.ExecuteReader();
readData.Read();
Console.WriteLine("Start Range: {0}", readData["Start_Range"]);
Console.WriteLine("End Range: {0}", readData["End_Range"]);
Console.WriteLine("Status: {0}", readData["Status"]);

Answers (1)