Saturday, February 25, 2012

Question

I use CCommand to execute a stored procedure with the following definition
CREATE PROCEDURE spSample
AS
SELECT *FROM tblSample
RETURN @.@.ROWCOUNT
GO
I use the ATL Object wizard to create an accessor to retrive data. However, the m_RETURNVALUE always give me 0 even if I have multiple records returned. Does m_RETURNVALUE suppose to get the return value of the stored procedure? How can I get the number o
f records returned without navigate the records?
Thanks for help.
Hi,
Use the below code
alter PROCEDURE spSample
AS
SELECT * FROM tblSample
select @.@.ROWCOUNT
GO
Thanks
hari
MCDBA
-- Roy wrote: --
I use CCommand to execute a stored procedure with the following definition
CREATE PROCEDURE spSample
AS
SELECT *FROM tblSample
RETURN @.@.ROWCOUNT
GO
I use the ATL Object wizard to create an accessor to retrive data. However, the m_RETURNVALUE always give me 0 even if I have multiple records returned. Does m_RETURNVALUE suppose to get the return value of the stored procedure? How can I get the num
ber of records returned without navigate the records?
Thanks for help.

No comments:

Post a Comment