cuetzpalin
Programmer
I'm getting the following error:
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
The line of code it fails on is where I'm setting "oPkg" to Server.CreateObject.
Any ideas? Please help!
Thanks!
Here's my code:
Const DTSSQLStgFlag_Default = 0
Const DTSStepExecResult_Failure = 1
const DTSSQLStgFlag_UseTrustedConnection = 256
Dim oPkg, oStep, sMessage, bStatus
Set oPkg = Server.CreateObject("DTS.Package")
oPkg.LoadFromSQLServer "myprintsql","sa","sql",DTSSQLStgFlag_UseTrustedConnection, "", "", "", "LoadBatchLabelData"
oPkg.Execute()
bStatus = True
For Each oStep In oPkg.Steps
sMessage = sMessage & "<p> Step [" & oStep.Name & "] "
If oStep.ExecutionResult = DTSStepExecResult_Failure Then
sMessage = sMessage & " failed<br>"
bStatus = False
Else
sMessage = sMessage & " succeeded<br>"
End If
sMessage = sMessage & "Task """ & oPkg.Tasks(oStep.TaskName).Description & """</p>"
Next
If bStatus Then
sMessage = sMessage & "<p>Package [" & oPkg.Name & "] succeeded</p>"
Else
sMessage = sMessage & "<p>Package [" & oPkg.Name & "] failed</p>"
End If
Response.Write sMessage
Response.Write "<p>Done</p>
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
The line of code it fails on is where I'm setting "oPkg" to Server.CreateObject.
Any ideas? Please help!
Thanks!
Here's my code:
Const DTSSQLStgFlag_Default = 0
Const DTSStepExecResult_Failure = 1
const DTSSQLStgFlag_UseTrustedConnection = 256
Dim oPkg, oStep, sMessage, bStatus
Set oPkg = Server.CreateObject("DTS.Package")
oPkg.LoadFromSQLServer "myprintsql","sa","sql",DTSSQLStgFlag_UseTrustedConnection, "", "", "", "LoadBatchLabelData"
oPkg.Execute()
bStatus = True
For Each oStep In oPkg.Steps
sMessage = sMessage & "<p> Step [" & oStep.Name & "] "
If oStep.ExecutionResult = DTSStepExecResult_Failure Then
sMessage = sMessage & " failed<br>"
bStatus = False
Else
sMessage = sMessage & " succeeded<br>"
End If
sMessage = sMessage & "Task """ & oPkg.Tasks(oStep.TaskName).Description & """</p>"
Next
If bStatus Then
sMessage = sMessage & "<p>Package [" & oPkg.Name & "] succeeded</p>"
Else
sMessage = sMessage & "<p>Package [" & oPkg.Name & "] failed</p>"
End If
Response.Write sMessage
Response.Write "<p>Done</p>