0
 Private Function ShowPic()
 Dim bytedata() As Byte
 Dim destfile As Integer
 Dim file As String
 Dim filelen As Long
 Dim numlock As Double
 Dim leftover As Long
 Const blocksize = 100000

 file = App.Path & "\image1.jpeg"

   destfile = FreeFile
   Open file For Binary Access Write As destfile

 filelen = RES(0).ActualSize
        numlock = filelen / blocksize
            leftover = filelen Mod blocksize

   bytedata() = RES(0).GetChunk(leftover)
        Put destfile, , bytedata()
 For i = 1 To numlock
      bytedata() = RES(0).GetChunk(blocksize)
        Put destfile, , bytedata()
 Next i

Close destfile
Picture1.Picture = LoadPicture(App.Path & "\image1.jpeg")
RES.Close
End Function

这是我获取存储在数据库中的图像并显示到图片框中的代码,每当我运行代码错误时,都会发生如下错误:Item cannot found in corresponding ordinal or name

4

0 回答 0