自己写代码操作Dim imgStream As New IO.MemoryStream
Dim PictureBox1 As WinForm.PictureBox = e.Form.Controls("PictureBox1")
Dim b As New Bitmap(PictureBox1.Image)
b.Save(imgStream, System.Drawing.Imaging.ImageFormat.Jpeg)
Dim data As Byte() = imgStream.GetBuffer
imgStream.Dispose()
Dim conn As New System.Data.SqlClient.SqlConn ection("server=localhost;database=test;Integrated Security=true;")
conn.Open()
Dim sqlcomm As New System.Data.SqlClient.SqlCommand
sqlcomm.Connection = conn
sqlcomm.CommandText = "UPD ATE [DDDDD] SET [第八列] = @第八列 WHERE [第一列] = @第一列 "
sqlcomm.Parameters.Add("@第八列", System.Data.SqlDbType.Image).Value = data
sqlcomm.Parameters.Add("@第一列", System.Data.SqlDbType.NVarChar).Value = "66"
sqlcomm.ExecuteNonQuery()
conn.Close()