Skip to content

Instantly share code, notes, and snippets.

@facebookegypt
Last active December 15, 2015 08:49
Show Gist options
  • Save facebookegypt/5233884 to your computer and use it in GitHub Desktop.
Save facebookegypt/5233884 to your computer and use it in GitHub Desktop.
Private Sub ReadPic()
'The Binary Method
Set Rs_Stream = Nothing
StrTempPic = App.Path & "/Temp.JPG"
Rs_Stream.Type = adTypeBinary
Rs_Stream.Open
Rs_Stream.Write RS!PhotoBLOB.Value
'Check the size of the ado stream to -
'make sure there is data
If Rs_Stream.Size > 0 Then
'Write the content of the stream object to a file
'The file will br created if doesn't exists.
'Otherwise over writes the existing file
Rs_Stream.SaveToFile StrTempPic, adSaveCreateOverWrite
'Load the temp Picture into the Image control
Picture1.Picture = LoadPicture(App.Path & "\Temp.JPG")
End If
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment