Paul

Paul

  • NA
  • 3
  • 0

Stored Procedure Call returning Output AND results set

Mar 5 2007 6:21 AM

I have the following sp on SQL2000.

create procedure [dbo].[psMobv_StockEnquiryGetCode1]
@Code    [varchar](14),
@RecCount  [int]      OUTPUT
AS
select prodcode from products
where prodcode = @Code
set @RecCount = @@rowcount
GO

I cannot get the value of the output parameter if I do a select before it.  If I just do "set @RecCount = (select count(*) from products where prodcode = @Code)" then it work fine. 
Is it possible to get output parameters AND results sets from a sp in c# as it is in say Delphi?

Many thanks