2005년 7월 17일 일요일

Executing packages stored within a structured storage file

<%
Dim objPkg, strError, iCount

 
'Create and Execute the package
 
Set objPkg = Server.CreateObject("DTS.Package")
  objPkg.LoadFromStorageFile "C:\test.dts","","","",""
  objPkg.Execute
 
 
'Check For Errors
 
For iCount = 1 To objPkg.Steps.Count
   
If objPkg.Steps(iCount).ExecutionResult = DTSStepExecResult_Failure Then
      strError = strError + objPkg.Steps(iCount).Name + " failed. " + chr(13)
   
End If
 
Next
 
 
If strError = "" Then
    Response.Write "Success"
 
Else
    Response.Write strError
 
End If

 
Set objPkg = Nothing
%>

댓글 없음:

댓글 쓰기