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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to load a SQLServer DTS package from ASP.net

Status
Not open for further replies.

eguthrie

Programmer
Nov 30, 2001
51
0
0
US
Hi. I'm having trouble loading a SqlServer DTS package from ASP.net. Here is the C# code:

DTS.Package2Class oDTS = new DTS.Package2Class();
object pVarPersistStgOfHost = null;
oDTS.LoadFromSQLServer("MYSERVER", "username", "password",DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default,null,null,null, "LoadBudget", ref pVarPersistStgOfHost);

This is the error I get:
The specified DTS Package ('Name = 'LoadBudget'; ID.VersionID = {[not specified]}.{[not specified]}') does not exist.

I've tried specifying the Package ID and Version ID, but I still get the error.

Can anyone help with this?

Thanks.
 
This could be a permissions issue with the ASPNET process not being allowed to access the DTS package. You can set the ASPNET account to have that authority (I would not necessarily recommend that).

An alternative would be to create a COM object in VB 6.0 (code is similar to above) to load the package. Then, I would deploy the application on the server via Component Services and just set that particular object's properties to execute with sufficient authority.

You can then launch the via asp.net.

I think that's what I did - I would have to double-check though.

Hope this helps.

Jim
 
I have a separate login acct in SQLServer that I'm using in making ADO connections to the database. That's the login I'm trying to use when loading the DTS package, not the ASPNET account. Would the ASPNET authority still be an issue?

I might have to check to see if the login acct I'm using has sufficient rights.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top