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 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 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.
 
Just a question ... not familiar with C# but ... here goes
(Comparing to VB 6)

You have ..
DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default
I use ...
DTSSQLStgFlag_Default

You have
,null,null,null,
I use
,"","","",

As I said I am not familiar with the .Net way, but maybe this could help ...




I was standing in the park, wondering why frisbees got bigger as they came closer... then it hit me!
 
The first part (about "...DTSSQLStgFlag_Default") is really not an issue. They're equivalent.

I tried using "" instead of null. Still get the error.

I think the issue I'm having may be a rights issue.
 
Try running it using sa.

Must admit I always try to run packages from storage files - makes everything a lot easier.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
I got it to work by assigning a user password to the package.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top