I have a SQL Server database, and I want to store in image type column some string.
I'm trying to do the following :
SqlParameter myparam = new SqlParameter("@myparam", "VeryLongString");
myparam.SqlDbType = SqlDbType.Image;
when I add it to the command and then execute it, I get the following error :
Failed to convert parameter value from a String to a Byte[]
What seems to be the problem ?
thanks in advance