20-05-14, 11:46 AM
السلام عليكم
هذا هو كود عرض الصورة حسب البحث ولكن المشكلة اذا كان حقل الصورة imm
لايحتوي صورة يعطي خطا ولكن اذا كان يحتوي صورة لايعطي خطا مالحل
والخطا يظهر
[b] imgByteArray = ds2.Tables(0).Rows(0).Item(0)[/b]
[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
[b] imgByteArray = ds2.Tables(0).Rows(0).Item(0)[/b]
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
لايحتوي صورة يعطي خطا ولكن اذا كان يحتوي صورة لايعطي خطا مالحل
والخطا يظهر
[b] imgByteArray = ds2.Tables(0).Rows(0).Item(0)[/b]
[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
[b] imgByteArray = ds2.Tables(0).Rows(0).Item(0)[/b]
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]
