Article View: borland.public.cppbuilder.database.ado
Article #1396Re: ADOQuery->Next
From: Arnie Mauer
Date: Tue, 06 Jul 2004 15:19
Date: Tue, 06 Jul 2004 15:19
21 lines
1496 bytes
1496 bytes
"hs" <nospam@dev.null> wrote in message news:40eaab97@newsgroups.borland.com... > Hi! > > When I load data directly into the dbgrid it takes about 2-3 secs, but when > I use a 'for' loop to take > every rows in ADOQuery result using Next it takes a lot more, about 20 secs. > How to optimise ADOQuery->Next? Without Next my loop ends after about 4 > secs. > > regards > hs The grid only reads enough data to fill the display. When you page down, it reads more. I'm guessing your for loop reads the entire result set which is probably a lot more rows than the number required for display by the grid. That would explain it. - Arnie
Technical Details
Message-ID:
<40eac313$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!fu-berlin.de!newsfeed.iinet.net.au!newsfeed.iinet.net.au!PeerFeed.KWeb.on.ca!news.kweb.on.ca!newsgroups.borland.com!not-for-mailReferences:
<40eaab97@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,ab65d78220f89c34 X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Arnie Mauer" <someone@microsoft.com> Newsgroups: borland.public.cppbuilder.database.ado References: <40eaab97@newsgroups.borland.com> Subject: Re: ADOQuery->Next Date: Tue, 6 Jul 2004 11:19:07 -0400 Lines: 23 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 24.151.53.89 Message-ID: <40eac313$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1089127187 24.151.53.89 (6 Jul 2004 08:19:47 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!fu-berlin.de!newsfeed.iinet.net.au!newsfeed.iinet.net.au!PeerFeed.KWeb.on.ca!news.kweb.on.ca!newsgroups.borland.com!not-for-mail