473,405 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

data from oledbdatreader can't paged by datagrid

Hi,
I am retrive record from an Access database and want them displayed page by
page,
I used oledbdatareader to retrive and assigned the datasource of datagrid
control to this reader.
but the data can't be paged when using AllowPaging=true, and it displayed
a page using AllowCustomPaging=true,but still can't be paged.

Is that if i want to page the records, I can't use oledbdatareader as
datasource ?
When I tried using oledataset, another problem appeared, the oledbcommand
object don't has a filldataset method.

Is that feasible that I page the records in DataGrid while I use the OLEDB
namespace?

Thanx.
Yangtsi
Nov 17 '05 #1
1 1668
Hi,

with custom paging you could do that but you are self responsibel for
returning coorrect data for the DataGrid.

If you use DataSet you would :

1. Create a OleDbCommand object (assumes you already have connection OK)
2. Create OleDbDataAdapter object that takes the command as parameter
(SelectCommand proeprty or constructor)
3. Create DataSet instance that you can fill with OleDbDataAdapter's Fill
method.
4. Bind the DataSet to the grid.

I.e OleDbCommand really doesn't have FillDataSet method but OleDbDataAdapter
is used instead.

--
Teemu Keiski
MCP,Designer/Developer
Mansoft tietotekniikka Oy
http://www.mansoft.fi

ASP.NET Forums Moderator, www.asp.net
AspAlliance Columnist, www.aspalliance.com

Email:
jo****@aspalliance.com

"Yangtsi River" <na***@sina.com> kirjoitti viestissä
news:%2****************@tk2msftngp13.phx.gbl...
Hi,
I am retrive record from an Access database and want them displayed page by page,
I used oledbdatareader to retrive and assigned the datasource of datagrid
control to this reader.
but the data can't be paged when using AllowPaging=true, and it displayed a page using AllowCustomPaging=true,but still can't be paged.

Is that if i want to page the records, I can't use oledbdatareader as
datasource ?
When I tried using oledataset, another problem appeared, the oledbcommand
object don't has a filldataset method.

Is that feasible that I page the records in DataGrid while I use the OLEDB namespace?

Thanx.
Yangtsi

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Duncan Welch | last post by:
I am in the process of developing a site that will, on completion, be quite high profile. I have successfully used the Datagrid to display paged data from a database of around 10k records, but the...
1
by: Christopher Pragash | last post by:
Hello All I am having a pretty wired problem...I am writing a web part (SPS 2003) that uses a Datagrid. In the web part, I create the datagird assign some properties and add event handlers for...
4
by: Patrick.O.Ige | last post by:
When i try to do paging in Datagrid why do i get the error:- System.Web.HttpException: Cannot compute Count for a data source that does not implement ICollection.?
1
by: Alagu | last post by:
Hi all, I am looking for some pointers as to how to do paging with datagrid.. Well, there are so many samples out there.. What I am looking for is to be able to have a dynamic query where the...
4
by: Ken Varn | last post by:
I am displaying data from a SQL Server database on my ASP.NET web form. The data table that I am displaying is huge and it must be paged. What I would like to do is display 10 records at a time...
4
by: Sandy | last post by:
Hello - Sorry to have posted this twice, but my question wasn't being answered and I think it might be because my subject wasn't clear. I have a datagrid and a dropdownlist (which is outside...
6
by: yer darn tootin | last post by:
I have a paged datagrid that when built consists of several pages. On each page there an ID number which is to be sent in a call another page, like this: Private Sub dgResults_ItemCommand(ByVal...
0
by: fergaloc | last post by:
Hi there. Our .net framework 1.1 application is a complex media player that plays back video, flash, web, TV and pictures full screen. It runs on Windows XP SP2. It has 12 DLLs and runs to about...
1
by: =?Utf-8?B?QVZM?= | last post by:
Hi, I've a requirement wherein I need to create datagrid dynamically along with the pagiantion implementation in aspx page. I've created the grid dynamically but i've problem with the paging...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.