For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic > April 2006 > VB DTS









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author VB DTS
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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com