Page 1 of 1

Calling a SP

PostPosted: Thu Sep 15, 2011 3:24 am
by Kalpana
Hi Team,

Can any one please help to understand of how to call a SQL 2005 Stored Procedure by passing some paramerets and capturing the return values from the SP.
:(

I tried the below code and it is returing the Invalid Cursor Exception.
!!CB!! 174
If (SqlPrepareSP(CpbReporting.hSqliReporting2,'dbo.TESTING',STRING_Null))
Set CpbReporting.sYesNo='YES'
else
Set CpbReporting.sYesNo='NO'


MY SP Looks like this

CREATE PROCEDURE TESTING
as

select top 10 * from sysadm.SECTOR

return 'TRUE'


Please help me with the above error. And let me know if you need any more informtion.

Thanks & Regards,
Kalpana

Re: Calling a SP

PostPosted: Thu Sep 15, 2011 8:53 am
by Jeff Luther
I am sure there's sample code here. Have you searched the forum yet?

I just did a search with this string: stored AND procedure
(you combine words in the search field with CAPITAL 'AND' as shown above) and got a long list of forum threads. Start by searching those for an example or test case that can help you.