Board index » delphi » Locate in a MSAccess table

Locate in a MSAccess table

Hello,

I use Delphi5 and BDE5.1 with native MSAccess driver.
i built a standard Query 'select * from mytable order by myindex' where
'mytable' is a MSAccess table. This table is indexed with 'myindex' field.
This table has about 18000 records. This table is accessed (add, search, ..)
at random on the network by 5 users.
When i Locate a record, with the Query1.Locate('myindex', aValue, [])
method, the time to locate is around 25 seconds.
I find it's long, isn't it?
What can be done to drastically shorten this time?
Thank's in advance.
Didier

 

Re:Locate in a MSAccess table


Quote
>I use Delphi5 and BDE5.1 with native MSAccess driver.
>i built a standard Query 'select * from mytable order by myindex' where
>'mytable' is a MSAccess table. This table is indexed with 'myindex' field.
>This table has about 18000 records. This table is accessed (add, search, ..)
>at random on the network by 5 users.
>When i Locate a record, with the Query1.Locate('myindex', aValue, [])
>method, the time to locate is around 25 seconds.
>I find it's long, isn't it?

You probably need to use a ttable instead of a Tquery and set the IndexName
property to the index you want to use
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:Locate in a MSAccess table


Hello,

I use Delphi5 and BDE5.1 with native MSAccess driver.
i built a standard Query 'select * from mytable order by myindex' where
'mytable' is a MSAccess table. This table is indexed with 'myindex' field.
This table has about 18000 records. This table is accessed (add, search, ..)
at random on the network by 5 users.
When i Locate a record, with the Query1.Locate('myindex', aValue, [])
method, the time to locate is around 25 seconds.
I find it's long, isn't it?
What can be done to drastically shorten this time?
Thank's in advance.
Didier

Other Threads