Load Data.vbs: Difference between revisions

m clean up
m Text replacement - "[[Category: " to "[[Category:"
 
(3 intermediate revisions by the same user not shown)
Line 13: Line 13:
   
   
  sub main
  sub main
phi_location = "\\Hsc1msfp0001\med_ccmed\CCMDB\PHI"
phi_location = "\\Hsc1msfp0001\med_ccmed\CCMDB\PHI"  
phi = phi_location & "\phi.mdb"
phi = phi_location & "\phi.mdb"
phi_loader = phi_location & "\PHI Loader.accdb"
phi_loader = phi_location & "\PHI Loader.accdb"
Set fso = CreateObject("Scripting.FileSystemObject")
Set fso = CreateObject("Scripting.FileSystemObject")
if fso.fileexists(phi) then  
if fso.fileexists(phi) then  
dim access
dim access
set access = CreateObject("Access.Application")
set access = CreateObject("Access.Application")
access.openCurrentDatabase(phi_loader)
access.openCurrentDatabase(phi_loader)
access.run "loadAllCSVFiles"
access.run "loadAllCSVFiles"
access.closeCurrentDatabase
access.closeCurrentDatabase
set access = nothing
set access = nothing
else
else
'msgbox "could not find phi.mbd"
'msgbox "could not find phi.mbd"
end if
end if
set fso = nothing
set fso = nothing
end sub
  end sub
 
== Related articles ==
{{Related Articles}}
 
[[Category:Batch Files]]
[[Category:Batch Files]]
[[Category:PHI]]