December 17, 2006 at 2:56 am
Hi everyone ,
i have a problem in executing a certain procedure that returns a value on a remote server. i am currently using the following statement:
declare @ServerName varchar(50)
declare @v1 int
set @ServerName = 'ALT1.clt_dev.dbo.proc_i_ICTG_New_Request'
exec @v1 = @ServerName @v_benmobno = "123445", @v_AcNo ="12144", @c_Cur = "AED", select @v1
the procedure is supposed to insert into a table ... the record is inserted twice ..! it works fine when "select @v1" isnt there but the problem is that the return value doesnt show up ...
December 17, 2006 at 9:14 pm
Try removing the comma. For example:
declare @ServerName varchar(50)
declare @v1 int
set @ServerName = 'ALT1.clt_dev.dbo.proc_i_ICTG_New_Request'
exec @v1 = @ServerName @v_benmobno = "123445", @v_AcNo ="12144", @c_Cur = "AED"
select @v1
December 17, 2006 at 9:17 pm
sorry that was a mistype !!
i would really appreciate it if someone would help me out...
December 17, 2006 at 9:26 pm
I would suggest either posting your stored procedure or profiling the execution and finding out where the problem lies. Your procedure call does not appear to be the culprit here.
December 18, 2006 at 2:20 pm
Are tehre any triggers on the table? If so, what are they?
Selecting @v1 will not cause it to eecute a second time.
December 19, 2006 at 2:15 am
What is the evidence that the procedure is executing twice?
Could it be executing once but producing unexpected results?
What happens if you call the procedure from SQA? Does it still execute twice?
What happens if you insert debug statements into the code?
Can you include the stored procedure code please?
David
If it ain't broke, don't fix it...
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply