هل تريد فقط كود التعديل على الصورة او كود التعديل مع التعديل على الصورة
PHP كود :
Dim Cmd As New SqlCommand
With Cmd
.Connection = Con
.CommandType = CommandType.Text
.CommandText = "Update TableName Set image = @image Where id = @id"
.Parameters.Clear()
Dim ms As New MemoryStream()
Dim bmpImage As New Bitmap(image.Image)
bmpImage.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg)
Dim data As Byte() = ms.GetBuffer()
Dim p As New SqlParameter("@image", SqlDbType.Image)
p.Value = data
.Parameters.Add(p)
.Parameters.AddWithValue("@id", SqlDbType.Int ).Value = idW
End With
If Con.State = 1 Then Con.Close()
Con.Open()
Cmd.ExecuteNonQuery()
Con.Close()
MsgBox("تم تعديل السجل بنجاح", MsgBoxStyle.Information, "تعديل")
Cmd = Nothing

