Subject Re: [IBO] TIBOTable.FindNearest
Author Hans
maybe setting at formcreation
CheckForReservedTokens := true;
helps

----- Original Message -----
From: <firebird@...>
To: <IBObjects@yahoogroups.com>
Sent: Wednesday, July 26, 2006 12:42 PM
Subject: RE: [IBO] TIBOTable.FindNearest


>> -----Original Message-----
>> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On
> Behalf Of firebird@...
>> Sent: Wednesday, July 26, 2006 11:43 AM
>> To: IBObjects@yahoogroups.com
>> Subject: [IBO] TIBOTable.FindNearest
>>
>>
>> I have this table:
>>
>> CREATE TABLE ARINV (
>> "Acc ID" INTEGER NOT NULL,
>> "Invoice #" VARCHAR(25) NOT NULL,
>> "Date" DATE NOT NULL,
>> "Sub Total" NUMERIC,
>> "Tax" NUMERIC,
>> "Freight" NUMERIC,
>> "Total" NUMERIC,
>>
>> ... and some more fields, clipped for brevity
>>
>> CONSTRAINT PK_ARINV PRIMARY KEY ("Acc ID", "Invoice #", "Date")
>> );
>>
>> This line of code
>>
>> tblInvoice.FindNearest( [ID, nil, nil] );
>>
>> throws an exception that says this:
>>
>> Cannot access index field 'ARINV."Acc ID" '
>>
>> from within TIBODataset.SetKeyFields.
>>
>> Does it want a separate index on each of "Acc ID", "Invoice #"
>> and "Date"?
>>
>> Michael D. Spence
>> Mockingbird Data Systems, Inc.
>>
>
> Upon further investigation, I've found the following:
>
> In TIBODataset.GetIndexField, the string 'ARINV."Acc ID"' is
> retrieved from InternalDataset.SQLOrderLinks.IndexNames.
>
> Subsequently, a FindField() call is made, but the field is
> named 'Acc ID' and AFAICT, FindField isn't overridden so
> it can never match 'Acc ID' to 'ARINV."Acc ID"'.
>
> Is this a bug or am I doing something untoward?
>
>
>
> Michael D. Spence
> Mockingbird Data Systems, Inc.
>
>
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
> InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
> papers,
> keyword-searchable FAQ, community code contributions and more !
> Yahoo! Groups Links
>
>
>
>
>
>
>