I am using SQL2000 and asp.net using vb.
I am returning a value for the number of records in a recordset that I am
binding to a datagrid but am not sure how to bring back value from SP.
Code for binding data from SP to grid:
invConn = New
SqlConnection(ConfigurationManager.ConnectionStrings("Connectstring").ConnectionString)
invConn.Open()
invComm = New SqlCommand(zStrg, invConn)
invComm.CommandType = Data.CommandType.StoredProcedure
invComm.Parameters.AddWithValue("@ClCode", strClCode)
iP = invComm.ExecuteReader
iP.Read()
dgPInv.DataSource = iP
dgPInv.DataBind()
Me.strUnits.Text = ? (SP
iP.Close()
invConn.Close()
With thanks
You need to:
1) Build another Parameter for the Output parameter and set its
direction to Output.
2) Return all of the rows from the query (by whatever means you choose)
3) Reference the output Parameter object .Value property
This is detailed in my book...

Signature
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------
>I am using SQL2000 and asp.net using vb.
> I am returning a value for the number of records in a recordset that I am
[quoted text clipped - 16 lines]
>
> With thanks