patriciaxxx
Programmer
I appreciate the two do not go together
Having said that how can I accomplish the following with my code below
I need Const cstrFileName = Currenetproject.path & “\ “ & Currenetproject.name
Function ExtractBLOBAll() As Boolean
'Extracts specified BLOB to file from table tblBLOB
Dim strSQL As String
Dim rst As Object 'ADODB.Recordset
Dim strFileName As String
Const cstrFileName = "C:\Documents and Settings\WRITE\BLOBFile"
Set rst = CreateObject("ADODB.Recordset")
strSQL = "SELECT FileExt, BLOB FROM tblBLOB"
rst.Open strSQL, CurrentProject.Connection, 1, 3
Do Until rst.EOF
If Not IsNull(rst!FileExt) Then
strFileName = cstrFileName & rst.AbsolutePosition & "." & rst!FileExt
End If
WriteBinaryFile rst.Fields("BLOB").Value, strFileName
rst.MoveNext
Loop
CloseUp:
On Error Resume Next
rst.Close
Set rst = Nothing
End Function
Having said that how can I accomplish the following with my code below
I need Const cstrFileName = Currenetproject.path & “\ “ & Currenetproject.name
Function ExtractBLOBAll() As Boolean
'Extracts specified BLOB to file from table tblBLOB
Dim strSQL As String
Dim rst As Object 'ADODB.Recordset
Dim strFileName As String
Const cstrFileName = "C:\Documents and Settings\WRITE\BLOBFile"
Set rst = CreateObject("ADODB.Recordset")
strSQL = "SELECT FileExt, BLOB FROM tblBLOB"
rst.Open strSQL, CurrentProject.Connection, 1, 3
Do Until rst.EOF
If Not IsNull(rst!FileExt) Then
strFileName = cstrFileName & rst.AbsolutePosition & "." & rst!FileExt
End If
WriteBinaryFile rst.Fields("BLOB").Value, strFileName
rst.MoveNext
Loop
CloseUp:
On Error Resume Next
rst.Close
Set rst = Nothing
End Function