我目前正在尝试使用以下代码将图像保存到我的数据库中:
byte[] myimage = new byte[FileUpload1.PostedFile.ContentLength];
HttpPostedFile Image = FileUpload1.PostedFile;
Image.InputStream.Read(myimage, 0, (int)FileUpload1.PostedFile.ContentLength);
string id = txtScanId.Text;
cmd1.CommandText = "INSERT INTO TABLE(AssetImage) VALUES (@Image)";
cmd1.Connection = con1;
con1.Open();
cmd1.ExecuteNonQuery();
但我收到错误:
必须声明标量变量“@Image”
谁能帮忙,我已经做了6个小时了!
谢谢!