| Travis 2006-04-28, 3:56 am |
| Hi ,
I use VB 6 to run the DTS package , the package is on the server. I
receive a error show below , any idea ?
Call DtsPkg.LoadFromSQLServer(strServer, strUserName, strPassword, _
DTSSQLStgFlag_Default, "", "", "", strPackage)
' Set Exec on Main Thread
For Each DtsStep In DtsPkg.Steps
DtsStep.ExecuteInMainThread = True
Next
' Execute
DtsPkg.Execute
' Get Status and Error Message
For Each DtsStep In DtsPkg.Steps
If DtsStep.ExecutionResult = DTSStepExecResult_Failure Then
DtsStep.GetExecutionErrorInfo lErr, strSource, strDesc
strMsg = strMsg & "Step """ & DtsStep.Name & _
""" Failed" & vbCrLf & _
vbTab & "Error: " & lErr & vbCrLf & _
vbTab & "Source: " & strSource & vbCrLf & _
vbTab & "Description: " & strDesc & vbCrLf & vbCrLf
MsgBox strMsg
Else
strMsg = strMsg & "Step """ & DtsStep.Name & _
""" Succeeded" & vbCrLf & vbCrLf
End If
Next
Error Msg :
Step "DTSStep_DTSExecuteSQLTASK_1" Failed
Error:-2147286789
Source:Microsoft OLE DB Service Components
Description: The file is not a valied compound file
|