Question : SQL 2000  Error -2147024888 when executing DTS from Stored procedure

When executing DTS using stored procedure in SQL 2000 getting error: -2147024888
This solution is not new. It's been working OK for a long time and out of nowhere start generating this error.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
DECLARE @object int
DECLARE @hr bigint
 
if len(@msg)=0
begin
	EXEC @hr = sp_OACreate 'DTS.Package', @object OUTPUT
	if @hr <> 0
	BEGIN
		set @msg=@msg + convert(varchar(30),@hr) + ': Error creating object DTS.Package # '
	END
end
 
if len(@msg)=0
begin
	SET @Cmd = 'LoadFromSQLServer("' + @Server +'", "' + @UserName + '", "' + @Password + '", 0, "", , , "' + @PkgName + '")'
	EXEC @hr = sp_OAMethod @object, @Cmd, NULL
	IF @hr <> 0
	BEGIN
		set @msg=@msg +convert(varchar(30),@hr) + ': Error loading LoadFromSQLServer # '
	END
end
 
select @msg as Message

Answer : SQL 2000  Error -2147024888 when executing DTS from Stored procedure

unfortunately, i don't know a specific lookup on the DTS errors themselves.  i just checked sqldts.com, as they are a huge resource in all dts regards.  but nothing
you may look here, it helps with the dts error hanlding:
http://www.sqlmag.com/Articles/ArticleID/6196/6196.html?Ad=1

and here's a good one on troubleshooting DTS:
http://www.mssqlcity.com/Articles/Adm/dts_troubleshooting.htm

i ask again, though, if this is a matter of just the proc, why don't exec the package differently?  especially if you say it runs fine when invoked manually from enterprice mgr?
i invoke a number of my pkgs from procs and/or sql agent, like this:
exec master..xp_cmdshell 'DTSRUN /S ''yourservername'' /E /N ''yourpackagename'' '
Random Solutions  
 
programming4us programming4us