Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling DTS package from ASP error

Status
Not open for further replies.

cuetzpalin

Programmer
Jun 5, 2002
99
US
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>
 
make sure that the IUSR_Machinename has the correct permissions to create the object...and make sure the object is registered correctly on the server...

-DNG

 
Should it be registered on the database server or web server? I found dtspkg.dll on the database server and copied it over to the web server. Tried to add it in component services, but received an error that stated it was missing associated files. I checked the user rights and those look ok.
 
it should be registered on the Webserver...

run this command at the command prompt on webserver...

regsvr32 dtspkg.dll

-DNG
 
If that doesnt work you could just install SQL Server on your web server... yuck.
 
I think installing sql on the web server will probably correct the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top