Run DTS from Access 2000

  • Thread starter Thread starter vseale
  • Start date Start date
V

vseale

I have a Access 2000 program that hotsyncs our PDAs to a
local Access data table. I want to run a SQL DTS package
each time the PDA hotsycs. Does anyone have any code
examples of runnings a DTS package from VBA? Thank you
for your help.
 
Have you created the DTS package and scheduled it? Once it has been
scheduled, I believe you can save this in a format that can be run with
DTSRun. Then use Shell() to run the DTSRun with the package.
 
The DTS has been written and successfully tested on the
SQL. I just need some code examples on how to
specifically call it within the Access module.
 
I don't have access to a SQL Server at the moment. Did you schedule the DTS
with Agent? Did you click on the scheduled job to see if you could save it
in a format that could be run with DTSRun?
 
Yes, I'm comfortable with the SQL side, it's the Access
VBA code I've never done. I just need a code example to
understand how to call it from Access. Thanks.
 
Here is some sample code that runs an external program

Function RunNotepad()
Dim var
Dim strCommand
strCommand = "Notepad.exe C:\My.txt"
var = Shell(strCommand, vbNormalFocus)
End Function
 
I finally found the code sample in the Microsoft
Knowledgebase (just have to say please the right way!).
The article number is 315661, but inputting the
title, "Run a SQL Server Data Transformation Sevices
Package from Visual Basic" will get you more related
articles listed.
 
Back
Top