How to access @@Rowcount value from stored procedure using ADO.NET
Posted on 2008-06-10
Here is a snipit of a stored procedure that I have created:
@FirstName varchar (50),
@LastName varchar (50),
@Email varchar (50)
DECLARE @RowCount int
UPDATE TOP (1) myTable
FirstName = @FirstName,
LastName = @LastName,
Email = @Email,
WHERE FirstName IS NULL AND Type = 33
SET @RowCount = @@ROWCOUNT
It is my understanding (and I could be entirely wrong here) that I cannot access @@ROWCOUNT directly in my VB code and that I needed to create another variable, which is why I created @RowCount.
Now I am wondering what I need to do to access this value using VB.NET.