TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
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"]);
Reply
Answers (
1
)
Fetch a binary data from database
Problems looping through restresponse