|
-
Jul 29th, 2005, 01:02 AM
#1
Thread Starter
Fanatic Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|