21-05-14, 12:01 PM
محتاج مساعدة للجواب لو سمحتم
هذا هو كود عرض الصورة حسب البحث ولكن المشكلة اذا كان حقل الصورة imm
لايحتوي صورة يعطي خطا ولكن اذا كان يحتوي صورة لايعطي خطا مالحل
والخطا يظهر
imgByteArray = ds2.Tables(0).Rows(0).Item(0)
[Try
Dim ds2 As New DataSet
Dim add As New addshed
ds2 = add.dayByNumcture(Val(TXTBiD.Text))
If ds2.Tables(0).Rows.Count > 0 Then
Dim imgByteArray() As Byte
imgByteArray = ds2.Tables(0).Rows(0).Item(0)
Dim Stream As New MemoryStream(imgByteArray, True)
Dim Img As System.Drawing.Image = New Bitmap(Stream)
imgSave.Image = Img
End If
Catch ex As Exception
addpicture2()
End Try/code]
هذا هو كود عرض الصورة حسب البحث ولكن المشكلة اذا كان حقل الصورة imm
لايحتوي صورة يعطي خطا ولكن اذا كان يحتوي صورة لايعطي خطا مالحل
والخطا يظهر
imgByteArray = ds2.Tables(0).Rows(0).Item(0)
[Try
Dim ds2 As New DataSet
Dim add As New addshed
ds2 = add.dayByNumcture(Val(TXTBiD.Text))
If ds2.Tables(0).Rows.Count > 0 Then
Dim imgByteArray() As Byte
imgByteArray = ds2.Tables(0).Rows(0).Item(0)
Dim Stream As New MemoryStream(imgByteArray, True)
Dim Img As System.Drawing.Image = New Bitmap(Stream)
imgSave.Image = Img
End If
Catch ex As Exception
addpicture2()
End Try/code]
