Dim TheDS As New DataSet
TheDS = TheDB.SelectRows("select * from Product_picture where PPID=" & ListExistPICID.Items.Item(ListExistPIC.SelectedIndex))
Dim myRow As DataRow
myRow = TheDS.Tables(0).Rows(0)
Dim MyData() As Byte
MyData = myRow("ThePicture")
TheDS = TheDB.SelectRows("select * from Product_picture where PPID=" & ListExistPICID.Items.Item(ListExistPIC.SelectedIndex))
Dim myRow As DataRow
myRow = TheDS.Tables(0).Rows(0)
Dim MyData() As Byte
MyData = myRow("ThePicture")
Dim bs As Stream = New MemoryStream()
bs.Write(MyData, 0, MyData.Length)
PB.Image = Image.FromStream(bs)
PB.Image = Image.FromStream(bs)
bs = Nothing
TheDS = Nothing
TheDS = Nothing
沒有留言:
張貼留言