Board index » delphi » SQL Server 6.5 / ADO / TDBGrid and large number of rows

SQL Server 6.5 / ADO / TDBGrid and large number of rows

Hi,

I'm populating a DBGrid from a query which returns hundreds of thousands of
rows, this takes a few minutes, which isn't acceptable.

Is there a way to only load a page at a time, i.e. load 20 records and when
the user scrolls down, load in the next 20.

I've tried looking at TCustomADODataSet and it's CacheSize member, but to no
avail.

Any help would be appreciated.

TIA.
Darren.

 

Re:SQL Server 6.5 / ADO / TDBGrid and large number of rows


Darren,

Quote
> I'm populating a DBGrid from a query which returns hundreds of thousands
of
> rows, this takes a few minutes, which isn't acceptable.

What will the users have to do if the row they are looking for is one of the
last rows in a half-million row result set?  Scroll down 25,000 times?

Quote
> Is there a way to only load a page at a time, i.e. load 20 records and
when
> the user scrolls down, load in the next 20.

A better and more user-friendly design approach would be giving them a way
to narrow the result set at the server, in other words build a query from
certain user selections to form your WHERE clause in your SQL. so they don't
have to spend extra time browsing a humongous result set.  Let the server do
some more of the work.

--
Jim

Re:SQL Server 6.5 / ADO / TDBGrid and large number of rows


Hi Darren:)

Use component TBetterADODataSet  (V.Nazarow.) descendent ADODataSet .
http://web.orbitel.bg/vassil/
CursorLocation properties set on clUseServer, CursorType properties set on
ctKeySet, RefreshType properties set on rtRequery and UpdateCriteria
properties set on adCriteriaKey.
CommandType properties set on cmdText and in CommandText properties insert
SQL statement- i.e.
select a, b, c, d  from  nametable  where c >= :param1.
It's all.
M.S.

U?ytkownik "Darren Bowles" <darr...@consort.co.uk> napisa3 w wiadomo?ci
news:3ce91eec_2@dnews...

Quote
> Hi,

> I'm populating a DBGrid from a query which returns hundreds of thousands
of
> rows, this takes a few minutes, which isn't acceptable.

> Is there a way to only load a page at a time, i.e. load 20 records and
when
> the user scrolls down, load in the next 20.

> I've tried looking at TCustomADODataSet and it's CacheSize member, but to
no
> avail.

> Any help would be appreciated.

> TIA.
> Darren.

Other Threads