Author: webthunder | Posted on: 6/10/2008 5:31:26 AM | Views : 1095

How can i return more than one item from a function. I am creating a 3-tier application with vb.net class and sql stored procedure. In function want to return sql datareader and an out parameter to aspx page. hows its possible?

Here is my code...

Imports System
Imports System.Configuration
Imports System.Data
Imports System.Data.SqlClient
Namespace products
 Public class get_productsbybrand
  Public function get_productbybrand(byval page as integer,byval brand as string) As SqlDataReader
   Dim totalvalue
   Dim con as New SqlConnection(ConfigurationSettings.AppSettings("ConnectionString")) 
   Dim cmd as New SqlCommand("get_productsbybrand3",con)
   cmd.CommandType=CommandType.StoredProcedure 
   Dim pagenumber as SqlParameter=cmd.Parameters.Add("@page",SqlDbType.int)
  ...

Go to the complete details ...