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
 Transact-SQL (2000)
 Procedure Call problem

Author  Topic 

shubhada
Posting Yak Master

117 Posts

Posted - 2006-08-11 : 01:00:46
I have one procedure cm_test with parameter @par1,@par2,@par3
This proc is calling from vc++ code. The call is as follow
exec cm_test @par1='abc',@par2='123', @par3 = 'xyz',@par2 = '123'

here the @par2 is being passed twice so I got the error

Server: Msg 8143, Level 16, State 2, Procedure cm_test, Line 0
Parameter '@par2' was supplied multiple times.

but same thing is working fine in sybase

Is there any way, SQL Server procedure can handle duplicate Parameters like Sybase?


SQLTeam

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-08-11 : 01:07:37
"Is there any way, SQL Server procedure can handle duplicate Parameters like Sybase?"
No. Don't think so. But why are you passing the same parameter multiple times ?


KH

Go to Top of Page

shubhada
Posting Yak Master

117 Posts

Posted - 2006-08-11 : 01:10:33
i am not passing the parameter twice ..this is a vc++ coding problem..otherwise i have to modify the vc++ code..

SQLTeam
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-08-11 : 01:20:04
in that case then modify the vc++ code


KH

Go to Top of Page

shubhada
Posting Yak Master

117 Posts

Posted - 2006-08-11 : 01:29:03
ok..thanks a lot..
i just want to confirm it..

SQLTeam
Go to Top of Page
   

- Advertisement -