Hi all,
I am executing one package through a Stored Procedure. Changing the value of a package variable. The SP is getting executed properly, but the variable value is not getting changed.
ALTER PROCEDURE [dbo].[sp_PkgExec]
AS
BEGIN
DECLARE @returncode int
EXEC @returncode = xp_cmdshell 'DTExec /FILE "pkg.dtsx"
/set \Package.Variables[User::strFilePath].Properties[Value];"file1.csv"'
print 'Return Code ' + CAST(@returncode As Varchar(10))
END
It is returning Return code as "zero" i.e. the package is getting executed with no error, still not applying the new value for variable "strFilePath".
Please help.
Thanks in advance.