I am executing a DTS package from vb.net. This package executes a stored proc
which is supposed to return a return value.
Here is my .net code:
Code:
Code:
Dim oPkg As DTS.Package2
Dim oStep As DTS.Step2
Dim results As Boolean
results = True
oPkg = New DTS.Package2
oPkg.LoadFromSQLServer(ServerName:="NINEL-D246655F1", ServerUserName:
="timecontroluser", ServerPassword:="timecontroluser", PackageName:
="ExportTSRLog")
oPkg.GlobalVariables.Remove("sCalldate")
oPkg.GlobalVariables.AddGlobalVariable("sCalldate", sCalldate)
For Each oStep In oPkg.Steps
oStep.ExecuteInMainThread = True
Next
oPkg.FailOnError = True
oPkg.Execute()
For Each oStep In oPkg.Steps
If oStep.ExecutionResult = DTS.DTSStepExecResult.
DTSStepExecResult_Failure Then
results = False
End If
Next
If results = True Then
lblResult.Visible = True
lblResult.Text = "TSRLogs have been exported"
End If
oPkg.UnInitialize()
oStep = Nothing
oPkg = Nothing
ExecuteDTS = results
I can not figure out how to capture this value on the vb.net side.
Do I need to do something special in the DTS package aside from just setting
the reeturn value in the stored procedure?
Can anyone help?
Thanks,
Ninel
--
Message posted via http://www.sqlmonster.com