🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.aspdotnet.components.using
Article #24

Re: D2005 Datagrid paging

#24
From: Marco Caspers
Date: Tue, 09 Jan 2007 06:43
45 lines
2597 bytes
James D. Franchello wrote:

> Hello Bob,
> 
> I managed to get it to work but what I had to do was the following:
> 
>       DataSet1.Dispose;
>       DataSet1 := Dataset.Create;
>       lItemCount := daRequests.Fill(Dataset1);
> 
> which seems really inefficient since it implies that on each Pageindex

Then you don't understand how WEB applications work.

This analogy works, albeit, extremely oversimplified:

- Take into mind a Win32 application.
- When you request a Web Page, the application is started.
- When the web page is rendered the application is terminated.

Thus anything created is also destroyed immediately.

> change I go and get all the data again. I guess I just don't
> understand these objects because it seemed to me that once I had used
> the Fill() the data should be available in the dataset so that any

Not in the dataset itself, because the object is destroyed because the
application is terminated.

You would need to store it into the viewstate of the webpage, and in
the repost would need to retreive it from there.

But you don't want that. Pages like these get gargantuan in size real
quick and you don't want to have your visitors waiting 2 minutes on
every repost before they see the new page.

> I am not using the BDP objects but rather the OLEDB objects. Is there
> any particular reason to use one over the other?

What database do you have? Does BDP support your database? If not, use
OLEDB.
BDP == Larger overhead, but better designtime support IF you've got a
higher than PRO SKU. PRO and below (turbo's) and BDP's useless anyways
as you can't bind it to anything because they didn't bother to put in
the components required to do so.
Technical Details
Message-ID: <45a33994@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <459d2f1e$1@newsgroups.borland.com> <45A0CBC6.4090602@chello.nl> <45a2a1ad@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 21665a,5bca6ea60c26735f
X-Google-Attributes: gid21665a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Marco Caspers" <HexorHaxor@vaxor.com>
Subject: Re: D2005 Datagrid paging
Newsgroups: borland.public.delphi.aspdotnet.components.using
References: <459d2f1e$1@newsgroups.borland.com> <45A0CBC6.4090602@chello.nl> <45a2a1ad@newsgroups.borland.com>
User-Agent: XanaNews/1.18.1.6
NNTP-Posting-Host: 84.246.26.28
Message-ID: <45a33994@newsgroups.borland.com>
Date: 8 Jan 2007 22:43:32 -0800
X-Trace: newsgroups.borland.com 1168325012 84.246.26.28 (8 Jan 2007 22:43:32 -0800)
Lines: 45
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail