![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm having a problem running a DTS package in VB. Everthing works fine on our development PC but when we install on our test PC the package seems to run (ie we're not getting an error message) but doesn't transfer the data to the table in SQL Server 2000. I've tried both calling the DTS package on the server using: Dim objPackage As New DTS.Package objPackage.LoadFromSQLServer _ ServerName:="test_server", _ ServerUserName:="******", _ ServerPassword:="******", _ PackageName:="ImportCSV" objPackage.Execute objPackage.UnInitialize and calling the *.dts package in the application directory using: Dim objPackage As DTS.Package2 Dim objStep As DTS.Step Dim objTask As DTS.Task Dim objExecPkg As DTS.ExecutePackageTask Set objPackage = New DTS.Package Set mobjPkgEvents = objPackage objPackage.FailOnError = True 'Create the step and task. Specify the package to be run, and link the step to the task. Set objStep = objPackage.Steps.New Set objTask = objPackage.Tasks.New("DTSExecutePackageTask") Set objExecPkg = objTask.CustomTask With objExecPkg .PackagePassword = "" .FileName = App.Path & "\ImportCSV.dts" .Name = "ImportCSV" End With With objStep .TaskName = objExecPkg.Name .Name = "ImportCSV" .ExecuteInMainThread = True End With objPackage.Steps.Add objStep objPackage.Tasks.Add objTask 'Run the package and release references. objPackage.Execute Set objExecPkg = Nothing Set objTask = Nothing Set objStep = Nothing Set mobjPkgEvents = Nothing objPackage.UnInitialize but neither seems to work on our test PC. Any thoughts on what we're missing would be appreciated. TIA Debi |
![]() |
| Thread Tools | |
| Display Modes | |
| |