saving picturebox image to sql server
hi,
I have a code below using c#. But wen I execute this code the error occur
strsql2.CommandText = "insert into hrattach(idkey,pb1)values(@idkey,@pb1)";
strsql2.Parameters.Add("@idkey",SqlDbType.NChar,6 );
strsql2.Parameters.Add("@pb1",SqlDbType.Image);
strsql2.Parameters["@idkey"].Value ="01019";
strsql2.Parameters["@pb1"].Value =picturebox1.Image; ' Error happens here
strsql2.CommandType = CommandType.Text;
strsql2.ExecuteNonQuery();
thanks
popskie
Re: saving picturebox image to sql server
I dont know sql, but at least describe the error so someone who does may be able to help you better
what's the exact error message??
Re: saving picturebox image to sql server
The error message is Object must Implement ICovertible.