I currently have a process which returns archived files back to main storage, but it takes two steps. Run a vbscript to actually move the file with the name being entered by InputBox. Then open up an Access database and run an Append Query , which takes input by InputBox, to restore the file listing to a "live" file table.
Fairly simple so far.
To make life a little easier on the users of this process, I want to make this work from one spot, the vbscript. Right now I’m working on the access portion as a standalone script until it’s functional, then I’ll incorporate it with the move file script. I've got a simple script to (hopefully) call the query, but really don't know how to pass the file name through to the Access query. When the query is run from Access, the InputBox stores the name in [Case_Number_To_Return]. If it matters, all inputs are in the form of 6 digit numbers.
Option Explicit
Dim oConn
set oConn = CreateObject("ADODB.Connection")
oConn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\Case_Files.mdb"
' executing query
oConn.Execute "exec RetPurgProc"
' Clean up
' oConn.Close
' oConn.Quit
'Set oConn = Nothing
Thanks,
Fairly simple so far.
To make life a little easier on the users of this process, I want to make this work from one spot, the vbscript. Right now I’m working on the access portion as a standalone script until it’s functional, then I’ll incorporate it with the move file script. I've got a simple script to (hopefully) call the query, but really don't know how to pass the file name through to the Access query. When the query is run from Access, the InputBox stores the name in [Case_Number_To_Return]. If it matters, all inputs are in the form of 6 digit numbers.
Option Explicit
Dim oConn
set oConn = CreateObject("ADODB.Connection")
oConn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\Case_Files.mdb"
' executing query
oConn.Execute "exec RetPurgProc"
' Clean up
' oConn.Close
' oConn.Quit
'Set oConn = Nothing
Thanks,