Load Data.vbs: Difference between revisions

From CCMDB Wiki
Jump to navigation Jump to search
Created page with "The VBScript Load_Data.vbs is part of PHI copy automation. == current content == 'Purpose: ' open the database on the network share ' run the vba procedure (entry po..."
 
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 9: Line 9:
  '
  '
  ' comment:  done silently - no shell to deal with as this is done using the access application object
  ' comment:  done silently - no shell to deal with as this is done using the access application object
 
  call main
  call main
sub main
phi_location = "\\Hsc1msfp0001\med_ccmed\CCMDB\PHI"
phi = phi_location & "\phi.mdb"
phi_loader = phi_location & "\PHI Loader.accdb"
Set fso = CreateObject("Scripting.FileSystemObject")
if fso.fileexists(phi) then
dim access
set access = CreateObject("Access.Application")
access.openCurrentDatabase(phi_loader)
access.run "loadAllCSVFiles"
access.closeCurrentDatabase
set access = nothing
else
'msgbox "could not find phi.mbd"
end if
set fso = nothing
  end sub


== Related articles ==
{{Related Articles}}


sub main
[[Category: Batch Files]]
phi_location = "\\Hsc1msfp0001\med_ccmed\CCMDB\PHI"
[[Category: PHI]]
phi = phi_location & "\phi.mdb"
phi_loader = phi_location & "\PHI Loader.accdb"
Set fso = CreateObject("Scripting.FileSystemObject")
if fso.fileexists(phi) then
dim access
set access = CreateObject("Access.Application")
access.openCurrentDatabase(phi_loader)
access.run "loadAllCSVFiles"
access.closeCurrentDatabase
set access = nothing
else
'msgbox "could not find phi.mbd"
end if
set fso = nothing
end sub
 
[[Category:Batch Files]]

Latest revision as of 21:46, 2019 February 6

The VBScript Load_Data.vbs is part of PHI copy automation.

current content

'Purpose:
'		open the database on the network share
'		run the vba procedure (entry point)
'		close the database
'		(keep all processing in background)
'
' comment:  done silently - no shell to deal with as this is done using the access application object

call main

sub main
	phi_location = "\\Hsc1msfp0001\med_ccmed\CCMDB\PHI" 
	phi = phi_location & "\phi.mdb"
	phi_loader = phi_location & "\PHI Loader.accdb"
	Set fso = CreateObject("Scripting.FileSystemObject")
	if fso.fileexists(phi) then 
		dim access
		set access = CreateObject("Access.Application")
		access.openCurrentDatabase(phi_loader)
		access.run "loadAllCSVFiles"
		access.closeCurrentDatabase
		set access = nothing
	else
		'msgbox "could not find phi.mbd"
	end if
	set fso = nothing
 end sub

Related articles

Related articles: