Hi. Im trying to write my own paging functions because the DataGrid built-in paging isnt customizable enough. I want it to look a certain way, and I cant accomplish that the "easy" way. My question is how can I retrieve just records, say, 5-10 from pdf.mdb? Currently Im using this to pull db records:
Sub BindDataGrid()
Dim DSet As DataSet = New DataSet()
Dim DBConnection as OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & server.mappath(DBPath))
Dim DAdapter As OleDbDataAdapter = New OleDbDataAdapter("Select * From PDF Order By ID ASC", DBConnection)
DAdapter.Fill(DSet, "PDF")
PDFList.DataSource = DSet
PDFList.DataBind()
End Sub
Can I just use a different SQL command to retrieve rows 1-5, then 5-10, 10-15 etc?
Thanks
Tj
Sub BindDataGrid()
Dim DSet As DataSet = New DataSet()
Dim DBConnection as OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & server.mappath(DBPath))
Dim DAdapter As OleDbDataAdapter = New OleDbDataAdapter("Select * From PDF Order By ID ASC", DBConnection)
DAdapter.Fill(DSet, "PDF")
PDFList.DataSource = DSet
PDFList.DataBind()
End Sub
Can I just use a different SQL command to retrieve rows 1-5, then 5-10, 10-15 etc?
Thanks
Tj