Board index » delphi » Please help with EDatabaseError: "Cannot access index field 'Foo'"

Please help with EDatabaseError: "Cannot access index field 'Foo'"

Hi,

I keep getting the message "Cannot access index field 'Foo'" when
trying to use FindKey method for a table. 'Foo' is my primary key.

The funny thing is that I use the same table and index in another form
without any problem.

I am using a paradox table here. I repaired and rebuilt the table
several times.

Does anybody know why may be this happening?

Thank you very much for any hint,

Rodrigo

 

Re:Please help with EDatabaseError: "Cannot access index field 'Foo'"


Rodrigo de Salvo Braz escribi en mensaje
<6vc638$hg...@forums.borland.com>...

Quote
>Hi,

>I keep getting the message "Cannot access index field 'Foo'" when
>trying to use FindKey method for a table. 'Foo' is my primary key.

>The funny thing is that I use the same table and index in another form
>without any problem.

>I am using a paradox table here. I repaired and rebuilt the table
>several times.

>Does anybody know why may be this happening?

>Thank you very much for any hint,

>Rodrigo

Are you sure that you have add the field 'Foo' to the TTable Object?.

Re:Please help with EDatabaseError: "Cannot access index field 'Foo'"


The primary index for a Paradox table has no name.  You must set the
IndexName property of your TTable to a null string to use the primary index.
You cannot have a primary index named Foo on a Paradox table.

--
Bill Todd
(Sorry but TeamB cannot answer questions received via email)
(Remove nospam from my email address to contact me for any other reason)

Other Threads