ADO.NET cmd.ExecuteReader OUTPUT parameters

Peter Osucha <[email protected]> Thu, 14 Jun 2007 09:27:11 -0400
Newsgroups gmane.comp.windows.devel.dotnet.cx
Message-ID <[email protected]>
It's been a while since I did this in VB6 - I can't seem to recall the
best way to go about it.  I have a SQLDataReader object being returned
from an ExecuteReader() method on a SqlCommand object that is calling a
stored procedure.=20

=20

The returned SQLDataReader contains 3 'Results' (it is returning 3
separate recordsets) and the stored procedure being called also updates
an OUTPUT parameter.  I need to know the OUTPUT parameter value before
processing the third of the 'Results'.  However, I can't get the updated
OUTPUT parameter until I close the DataReader - after which I cannot go
back and loop through the 3rd of the 'Results'.

=20

What is a solution to this problem, please ('m reluctantly hoping it
isn't to return a single value in a 'Result' between the current 2nd and
3rd results with a recordset having one value- that of the OUTPUT
parameter I want)?

=20

Peter


=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
This list is hosted by DevelopMentor=AE  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com