Created
March 24, 2013 22:40
-
-
Save facebookegypt/5233900 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub RetrieveBlob() | |
'The BLOB Method | |
StrTempPic = App.Path & "\Temp.jpg" | |
If Len(Dir(StrTempPic)) > 0 Then | |
Kill StrTempPic | |
End If | |
'Open the temporary file to save the BLOB to | |
nHand = FreeFile | |
Open StrTempPic For Binary As #nHand | |
'Read the binary data into the byte variable array | |
lngImgSiz = RS("PhotoBLOB").ActualSize | |
Do While lngOffset < lngImgSiz | |
Chunk() = RS("PhotoBLOB").GetChunk(conChunkSize) | |
Put #nHand, , Chunk() | |
lngOffset = lngOffset + conChunkSize | |
Loop | |
Close #nHand | |
'After loading the image, get rid of the temporary file | |
Picture1.Picture = LoadPicture(StrTempPic) | |
Kill StrTempPic | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment