VB.NET 在SQL下载图片到PictureBox中,老是提示MemoryStream内存不足
For i As Integer = 0 To 17
Dim P As PictureBox
PanelD = Displayed_DATA.Controls(Panel_data(i))
TLPanel = PanelD.Controls(TLP(i))
P = TLPanel.Controls(P_data(i))
If DisplayedData_myds.Rows(0)(poho_data(i)) Is DBNull.Value Then
P.Image = Nothing
Else
Dim data() As Byte = DisplayedData_myds.Rows(0)(poho_data(i))
Dim stmphoto As New IO.MemoryStream(data, 0, data.Length, True)
P.Image = New Bitmap(stmphoto)
stmphoto.Close()
stmphoto.Dispose()
End If
Next
老是提示MemoryStream内存不足