473,657 Members | 2,493 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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=tru e, and it displayed
a page using AllowCustomPagi ng=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 1680
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 OleDbDataAdapte r object that takes the command as parameter
(SelectCommand proeprty or constructor)
3. Create DataSet instance that you can fill with OleDbDataAdapte r's Fill
method.
4. Bind the DataSet to the grid.

I.e OleDbCommand really doesn't have FillDataSet method but OleDbDataAdapte r
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****@aspallia nce.com

"Yangtsi River" <na***@sina.com > kirjoitti viestissä
news:%2******** ********@tk2msf tngp13.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=tru e, and it displayed a page using AllowCustomPagi ng=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
2368
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 standard paging techniques use a linkbutton, which runs a small piece of client-side javascript. To my understanding, this means that when I get "spidered" by a search engine, it won't follow the javascript links, thereby my database won't get...
1
1867
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 paging and sorting using AddHandler. While browsing, I sort the grid and do paging, it works fine for increasing page numbers...ie if I go from 1 - to - 2 - to - 3 the sort is maintained and the paging works fine. If I come back to page 2 from page...
4
3604
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
1073
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 user can enter something in a text box and search for that and we show the results using a paged datagrid.. When the page is loaded, I want to execute a query like SELECT * FROM AUTHORS WHERE AUTHOR_NAME = Request("AuthorName") or something like
4
1527
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 and allow the user to jump to a particular page if they desire. I would like my interface to display the total number of pages and offer the user the ability to select which page they would like to display. I have not figured out how I can do...
4
1682
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 the datagrid). When I click on a category in the dropdownlist, the datagrid changes to correspond to that category. The datagrid is paged. Everything works fine, as long as the pager is on the first page. When the
6
1990
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 source As System.Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles dgResults.ItemCommand If e.CommandName = "ViewID" Then Response.Redirect("IDdetail.aspx?ID=" & e.Item.Cells(2).Text.ToString)
0
1748
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 30,000 lines of code. We're 100% .net except for two activeX controls. These are 1) Internet Explorer (ActiveX) 2) Flash Control (ActiveX) We have identified a leak in the app which will cause the system to
1
1291
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 event.. This dynamcially binded event isn't firing...when I click on the page number.. Any articles on dynamically adding datagrod along with events like pageindexedchaged, itemdataboun etc//
0
8421
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8325
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8844
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8742
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8518
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2743
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1734
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.