June 12, 2003 at 3:46 pm
Did you remember to specify the output parameter as an output?:
exec proc_name @output_Param = @localVar OUTPUT
This works on sql2000.... I don't know about 7.0
drop table t1
drop table t2
drop procedure usp_test
GO
create table t1 (col1 int)
create table t2 (col1 int)
GO
create procedure usp_test
@output int OUTPUT
AS
set @output = 10
GO
create trigger t1_trigger on [t1]
for INSERT
AS
declare @A int
exec usp_test @output = @A OUTPUT
insert into t2
select @A as Col1
--select * from INSERTED
GO
select * from t1
select * from t2
insert into t1 (col1) select 100 as col1
select * from t1
select * from t2
June 13, 2003 at 5:40 am
>Did you remember to specify the output parameter as an output?:
Well - I wouldn't be getting the correct (non-NULL) values returned in QA if it wasn't, would I?
>exec proc_name @output_Param = @localVar OUTPUT
I haven't been as explicit with the params in my sp call as this. Mine would be:
exec proc_name @output_param OUTPUT
Could this be a problem?
GAM
June 14, 2003 at 7:49 pm
Have found in the past that i cannot use QA as an application in sense of a testing routine, since it acts completely differently from the other routines that we have to implement. Sorry that this does not help and that my life is a complete failure, but maybe the problem lies elsewhere...
June 15, 2003 at 9:39 pm
Maybe if you implement jraha's example and check that it work as expect in the trigger and then substitute your real code.![]()
Viewing 4 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply