Using locate on non-keyfields 
Author Message
 Using locate on non-keyfields

Hi everybody,

I am using delphi 3 Professional and Access 7.0.
I have a table with a primary key on field cod, and a index on filed
ZIP.
When I try to do this:

  table1.locate('name','Doqcuir',[lopartialkey]);

I get this error:

  Table1 has no index for fields 'name'

But on the developers guide on page 10-5 Borland says "...These
methods enable you to search on any type of fields in any table,
wheter or not they are indexed or keyed."

Is this a bug ?
Am I doing something wrong ?

Yves Robert



Wed, 18 Jun 1902 08:00:00 GMT  
 Using locate on non-keyfields

Quote:

> Hi everybody,

> I am using Delphi 3 Professional and Access 7.0.
> I have a table with a primary key on field cod, and a index on filed
> ZIP.
> When I try to do this:

>   table1.locate('name','Doqcuir',[lopartialkey]);

> I get this error:

>   Table1 has no index for fields 'name'

> But on the developers guide on page 10-5 Borland says "...These
> methods enable you to search on any type of fields in any table,
> wheter or not they are indexed or keyed."

> Is this a bug ?
> Am I doing something wrong ?

> Yves RobertI would GUESS this is because your options are [lopartialkey], and this

would need a index.

Cheers
Conrad



Wed, 18 Jun 1902 08:00:00 GMT  
 Using locate on non-keyfields

Quote:

> I am using Delphi 3 Professional and Access 7.0.
> When I try to do this:
>   table1.locate('name','Doqcuir',[lopartialkey]);
> I get this error:

>   Table1 has no index for fields 'name'

I've got a freeware component that will do locates, on any field, with
partial-matches, and it will handle "contains" conditions, even on
memo/blob fields.  I haven't specifically tested it with Access, but
I've heard from people using it with Oracle, so I'm guessing it will
work.

www.csd.net/~cgadd/delphi.htm  then go to the components page.  The
component is named TfxLocate.

Chuck Gadd
Director of Software Development, {*filter*} FX Communications.

Remove the -NOSPAM from my email address to send me e-mail.
*** I boycott businesses that send me unsolicited email adverti{*filter*}ts ***



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Locate, and filter don't work on keyfields / autoincrement

2. Locate by non-key value.

3. Using Locate on 2 Fields

4. Help using the TTable.Locate command

5. Using Locate on 2 fields

6. Help using LOCATE with delphi 3.02

7. Problems using DATASET.LOCATE

8. Using Locate method in Delphi 2

9. Using 'Locate' on MSSQL tables

10. Locate next using bookmark on paradox7 table

11. Problems using Locate with a query...

12. Problem with BDE and SQL Server using Locate/FindKey

 

 
Powered by phpBB® Forum Software