Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Index out of range
Tue, Jun 26 2007 5:07 AMPermanent Link

Jacob
I am having a problem with FindKey function that is driving me crazy.

I use C++ Builder 6 and I want to use a table to find some entries in a quick way. The
table has an Index Field already defined called IP, a string field.

I have tried all combinations with no happy result.

table2->Open();
table2->IndexFieldNames="IP"; // (this is the name of the primary index field), I have
tried table2->IndexName = "" also...no luck...
TVarRec tvrFindValues[] = {ip}; // ip is an AnsiString value
if (table2->FindKey(tvrFindValues,1)){    // This sentences raises an error "Field Index
out of range"
         (....)
}

What I am doing wrong?

Thanks for teh support.
Tue, Jun 26 2007 1:11 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Jacob,

<< I have tried all combinations with no happy result.

table2->Open();
table2->IndexFieldNames="IP"; // (this is the name of the primary index
field), I have
tried table2->IndexName = "" also...no luck...
TVarRec tvrFindValues[] = {ip}; // ip is an AnsiString value
if (table2->FindKey(tvrFindValues,1)){    // This sentences raises an error
"Field Index
out of range"
         (....)
}

What I am doing wrong? >>

If you're using persistent field objects via the fields editor, make sure
that the fields that are in the index that you're using are present as
persistent field objects also.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image