I would like to pass the page number and the number of records per rows. right now it is hard coded in my code and wondering how to get this from the asp.net page. thanks
Code:
Imports System
Imports System.Data
Imports Oracle.DataAccess.Client
Imports Oracle.DataAccess.Types
Public Class testrefcur
Public Shared Sub Main()
Using con As New OracleConnection("data source=orcl;user id=scott;password=tiger;")
con.Open()
Using cmd As New OracleCommand("getempscur", con)
cmd.CommandType = CommandType.StoredProcedure
Dim p2 As New OracleParameter("p2", OracleDbType.RefCursor, ParameterDirection.Output)
cmd.Parameters.Add(p2)
cmd.ExecuteNonQuery()
Dim rc As OracleRefCursor = DirectCast(p2.Value, OracleRefCursor)
Dim da As New OracleDataAdapter()
Dim ds As New DataSet()
da.Fill(ds, 2, 5, "EMP", rc)
' contains rows 2-7
da.Dispose()
rc.Dispose()
End Using
End Using
End Sub
End Class