rs.Open "SELECT ID, Image FROM BLAH", conn
Dim aByte() As Byte
Dim iFile As Integer
Do Until rs.EOF
ReDim aByte(rs.Fields("Image".ActualSize)
aByte = rs.Fields("Image".GetChunk(rs.Fields("Image".ActualSize)
iFile = FreeFile()
Open "C:\images\" & rs.Fields("ID".Value & ".JPEG" For Binary As #iFile
Put #iFile, , aByte
Close #iFile
rs.MoveNext
Loop
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.