I'm pretty new to C# (As I'm sure you'll be able to tell) and I know this question has been asked a few times but none of the solutions have worked for me.
I'm trying to pull a Varbinary(MAX)
value out of a database and store it as a string. I'm using a SqlDataReader
for lifting some of the other columns out which works fine. All I'm using for them is .ToString()
, but if I use ToString()
for the Logo it returns System.Byte[]
public TemplateData(SqlDataReader dr)
{
initialiseData();
if (dr.HasRows)
{
Logo = dr["Logo"].ToString();
TemplateId = dr["TemplateId"].ToString();
Comment = dr["Comment"].ToString();
SchemeCode = dr["SchemeCode"].ToString();
Version = dr["Version"].ToString();
}
}
There is a plethora of issues I'm having aswell but I'll leave them for now.
Cheers!