![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Does this article help Global Variables and Stored Procedure Parameters http://www.sqldts.com/default.aspx?6,102,234,0,1 -- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Ramandeep Singh" <ramandeepuh (AT) hotmail (DOT) com> wrote in message news:e8AsCJzRDHA.704 (AT) tk2msftngp13 (DOT) phx.gbl... Hi Everyone, Okay, I have the following sql in my SQL Task: ------------------------------------------------------------------ declare @Inserts int, @RowsAffected int exec usp_dts_masternet_init @Inserts output, @RowsAffected output update temp_tbl set value1 = @Inserts, value2 = @RowsAffected where type = 'TRANS01' select @Inserts AS Ins, @RowsAffected AS Upd ------------------------------------------------------------------ And then in my Parameters... > Output Parameters I have mapped 'Ins' and 'Upd' to my global variables called 'gvInserts' and 'gvUpdated' respectivitly. It should work right? Well in my dts (after this step) I use these global variables in ActiveX to write to log file. But the problem is that these global variables are always empty. Any ideas?? I know that the proc is returning the output prams b/c when I do the update into temp_tbl table I see the values there. Thanks, Raman |
#3
| |||
| |||
|
|
Thanks Allan, actually I used this article as a reference but it does not help. I've followed exactly that with no such luck. I did some more investigating and am finding that when I set my global variables from the execute sql output prams with "Row Value" as the output parameter type--it doesn't set the global variable value there. Am I missing some other setting?? Or do I need to set some property to the dts itself?? I'm using sql server 2000 sp3 "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:%23GXF8Y3RDHA.940 (AT) TK2MSFTNGP11 (DOT) phx.gbl... Does this article help Global Variables and Stored Procedure Parameters http://www.sqldts.com/default.aspx?6,102,234,0,1 -- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Ramandeep Singh" <ramandeepuh (AT) hotmail (DOT) com> wrote in message news:e8AsCJzRDHA.704 (AT) tk2msftngp13 (DOT) phx.gbl... Hi Everyone, Okay, I have the following sql in my SQL Task: ------------------------------------------------------------------ declare @Inserts int, @RowsAffected int exec usp_dts_masternet_init @Inserts output, @RowsAffected output update temp_tbl set value1 = @Inserts, value2 = @RowsAffected where type = 'TRANS01' select @Inserts AS Ins, @RowsAffected AS Upd ------------------------------------------------------------------ And then in my Parameters... > Output Parameters I have mapped 'Ins' and 'Upd' to my global variables called 'gvInserts' and 'gvUpdated' respectivitly. It should work right? Well in my dts (after this step) I use these global variables in ActiveX to write to log file. But the problem is that these global variables are always empty. Any ideas?? I know that the proc is returning the output prams b/c when I do the update into temp_tbl table I see the values there. Thanks, Raman |
![]() |
| Thread Tools | |
| Display Modes | |
| |