In VB6 there was a thing called a Recordset Object. I could start with a stored procedure which returned some columns and rows from a SELECT statement, and then get the .Items(X) from the Recordset in code.

I am trying the same thing in .NET but cant find a Recordset object or anything like it. I have seen alot of references to the Dataset, but nearly all the examples are binding it to GUI objects. Thats not what I want.

I have stored procs that return "recordsets". How can I get at them from VB.NET?

Here is how I am currently getting return values from SP to .NET:

VB Code:
  1. Dim myGetInfoConnection As New SqlConnection(System.Environment.GetEnvironmentVariable("RhinoConnectionString"))
  2.             Dim myGetInfoCommand As New SqlCommand("spIAS_GetImageFromOperation", myGetInfoConnection)
  3.             '
  4.             ' Mark the Command as a SPROC
  5.             myGetInfoCommand.CommandType = CommandType.StoredProcedure
  6.             '
  7.             ' Add Parameters to SPROC
  8.             prmRETURN_VALUE = myGetInfoCommand.Parameters.Add("@RETURN_VALUE", SqlDbType.Int)
  9.             prmRETURN_VALUE.Direction = ParameterDirection.ReturnValue
  10.             '
  11.             Dim prmOperationID As New SqlParameter("@operationID", SqlDbType.Int)
  12.             prmOperationID.Value = m_OperationID
  13.             myGetInfoCommand.Parameters.Add(prmOperationID)
  14.             '
  15.             Try
  16.                 '
  17.                 myGetInfoConnection.Open()
  18.                 myGetInfoCommand.ExecuteNonQuery()
  19.                 m_PictureID = myGetInfoCommand.Parameters(0).Value
  20.                 '
  21.                 myGetInfoConnection.Close()
  22.                 '
  23.             Catch SQLexc As SqlException
  24.                 Response.Write("SP Failed. Error Details are: " & SQLexc.ToString())
  25.             End Try

Thanks!

Dave