I have a table with a varbinary(MAX) parameter. After executing the query, I will store the result in SqlDataReader as it has multiple columns as output.
SqlCommand cmd = new SqlCommand("select leave_details from LeaveTable");
SqlDataReader obj;
con.Open();
obj = cmd.ExecuteReader();
Now I want to convert the result for each row into byte[].
This one is not working:
byte[] b=null;
obj.GetBytes(0,0,b,0,1024);
Try
GetValue()method.