Hi Scott,
The Reference you need is Microsoft ActiveX Data Objects 2.8 Library
below is just a cut and paste from my work, it will save the document to the
temp folder, this function is passed an id, the resulting document will be
id.doc, you will need another field for document type as mine is only setup
for word documents.
Public Function ReadFromDB(strID As String) As String
On Error GoTo Err_ReadFromDB
Dim adoDocument As New ADODB.Recordset
Dim mStream As ADODB.Stream
Dim SQL As String
Dim strTemp As String
strTemp = Environ("Temp")
SQL = "Select * from TblCandidate_Contact_History Where
Candidate_Contact_History_ID=" & strID
Set adoDocument = New ADODB.Recordset
adoDocument.Open SQL, CurrentProject.Connection, adOpenKeyset,
adLockOptimistic
Set mStream = New ADODB.Stream
mStream.Type = adTypeBinary
mStream.Open
mStream.Write adoDocument.Fields("Doc_Embed").Value
mStream.SaveToFile strTemp & "\" & strID & ".doc", adSaveCreateOverWrite
ReadFromDB = strTemp & "\" & strID & ".doc"
adoDocument.Close
Exit_ReadFromDB:
Exit Function
Err_ReadFromDB:
DisplayError "modSQLDoc", "ReadFromDB", Err.Description, Err.Number, Erl
Resume Next
End Function
any problems post back,