Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom paging for oracle

Status
Not open for further replies.

taree

Technical User
May 31, 2008
316
US
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
 
thank you Mark for your response.How can I get the page number from the gridview by using your suggestion.thank you
 
Thank you Mark. I will work on this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top