Subject RE: [IBO] TIBOTable.FindNearest
Author firebird@spence.users.panix.com
Well, it was new information, but it didn't help.

This goes away if I avoid having fields that are ever used in this way
that *need* quoting, but changing that's going to cost me a great
deal of time. There are on the order of 100 to 150 such fields in
about 75 tables, and 1000 source modules (including dfms!) where
I'll have to track down the name changes. Not to mention the
fact that I'll have to make the database converter deal with this
issue.

The fact that Paradox allowed this kind of thing has been a
thorn in my side from the beginning of this conversion.


-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf
Of Hans
Sent: Wednesday, July 26, 2006 3:06 PM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] TIBOTable.FindNearest



maybe setting at formcreation
CheckForReservedTokens := true;
helps

----- Original Message -----
From: <firebird@spence. <mailto:firebird%40spence.users.panix.com>
users.panix.com>
To: <IBObjects@yahoogrou <mailto:IBObjects%40yahoogroups.com> ps.com>
Sent: Wednesday, July 26, 2006 12:42 PM
Subject: RE: [IBO] TIBOTable.FindNearest

>> -----Original Message-----
>> From: IBObjects@yahoogrou <mailto:IBObjects%40yahoogroups.com> ps.com
[mailto:IBObjects@yahoogrou <mailto:IBObjects%40yahoogroups.com> ps.com] On
> Behalf Of firebird@spence. <mailto:firebird%40spence.users.panix.com>
users.panix.com
>> Sent: Wednesday, July 26, 2006 11:43 AM
>> To: IBObjects@yahoogrou <mailto:IBObjects%40yahoogroups.com> ps.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.ibobject <http://www.ibobjects.com> s.com - your IBO community
resource for Tech Info
> papers,
> keyword-searchable FAQ, community code contributions and more !
> Yahoo! Groups Links
>
>
>
>
>
>
>







[Non-text portions of this message have been removed]