Good morning, I have the following case, I am working with dataset in visual basic, having an SP in SLQ server which returns a query, but add a parameter to know the number of records to return, to make a validation in SQL Server works well for me, but with the data set I have not found how to recover the variable with the number of records.
These are the parameters in the SP:
PROCEDURE [dbo].registrosaprocesarpormes
@pnIDECIA int;
@pdfechacorte date;
@pnrowcount int OUTPUT
select * from dbo.movimientos where fecha = fechacorte
--- actualizando el valor devuelto en el sp
set @pnrowcount = @@ROWCOUNT;
This variable is what I need to recover or the value of it in the form of the process, I hope your help and I appreciate your explanation.