Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 DTS Package Fails !!!! Executed within Stored Proc

Author  Topic 

sschmidt
Starting Member

2 Posts

Posted - 2004-09-03 : 00:56:17
We have a package that is called from a stored procedure
This package works on its own but fails to open and execute
from within the stored procedure.

the code is SELECT @Customer = dbo.fnCustomerName()
SELECT @FileType = RDH.FileType,
@FilePath = RDH.FilePath,
-- @Customer = FT.Customer,
@RDFormat = FT.RDFormat
FROM vwRawDataHeader RDH
JOIN vwFileTypes FT ON FT.FileType = RDH.FileType
WHERE RDH.FileID = @fileID
SET @GVValue = CAST(@fileID AS VARCHAR(10))
SET @Cmd = 'GlobalVariables("FileID").Value'
IF @myError = 0
BEGIN
EXEC @hr = SP_OASETPROPERTY @oPKG, @Cmd, @GWalue

Any assistance is appreciated !!!!

sschmidt
Starting Member

2 Posts

Posted - 2004-09-03 : 01:07:34
Forgot to mention ...

SET @Cmd = 'LoadFromStorageFile("' + @GenericDTSPackageFilePath + '", "''")'
SET @Cmd = 'LoadFromSQLServer("' + @Server +'", "ABRSDataLoader", "~4dt5ldR", , "' + @PkgPWD + '", , , "' + @PkgName + '")'
EXEC @hr = SP_OAMETHOD @oPKG, @Cmd
Go to Top of Page
   

- Advertisement -