Click here to Skip to main content
11,934,380 members (44,199 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB6 Oracle
Private Function ShowPic()
Dim bytedata() As Byte
Dim destfile As Integer
Dim file As String
Dim filelen As Long
Dim numlock As Integer
Dim leftover As Long
Dim i As Integer
Const blocksize = 100000
file = App.Path & "/mypic/Book1.xls"
       destfile = FreeFile
       Open file For Binary As destfile
       filelen = LOF(destfile)
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
End Function

Error is:
Item cannot be found in requested name or ordinal........
bytedata() = RES(0).GetChunk(leftover)

Please help....
Posted 24-Jan-13 18:55pm
Edited 13-Feb-13 11:56am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.151126.1 | Last Updated 14 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100