Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Cannot access index field "__RowID"
Tue, Mar 13 2012 9:12 PMPermanent Link

Dominique Willems

Anyone have any kind of clue what this error means?

Is created by the TEDBTable.GetIndexField method, but call stack
doesn't show me any other context.
Tue, Mar 13 2012 9:36 PMPermanent Link

Dominique Willems

Dominique Willems wrote:
> Is created by the TEDBTable.GetIndexField method, but call stack
> doesn't show me any other context.

Traced it down to a table.FindKey([ID]) where the table didn't have a
primary key constraint (only a foreign key one on that field). Added
the primary one and all is dandy.

Carry on.
Wed, Mar 21 2012 4:21 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Dom,

<< Traced it down to a table.FindKey([ID]) where the table didn't have a
primary key constraint (only a foreign key one on that field). Added the
primary one and all is dandy. >>

Yep, if you don't create a primary key for a table, then EDB creates one for
you on the internal __RowID column.  However, this never gets surfaced as a
TField, so it cannot be used with the navigational methods of the TEDBTable
component.

Also, in case anyone is wondering, yes, you can reference that system column
by name in SQL, etc.:

SELECT __RowID FROM customer

--
Tim Young
Elevate Software
www.elevatesoft.com
Image