Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Error #10051
Sat, Jan 31 2009 10:44 PMPermanent Link

"Jerry Clancy"
4.21 Build 11 with D5 Ent.

I'm getting this error on what appears to be a perfectly good filter
expression when setting it..The database has an AX_AID string field (6
chars) and the indexname set is 'AXAID', which is defined as
 " if FindField('AXAID') <> nil then
AddIndex('AXAID','AX_AID;AX_BILL;AX_SPONTYP', [ixCaseInsensitive]); "

The other two fields are also of type string.

I assign the following string: sFilter := '(AX_ID=' + QuotedStr(sCurAID) +
') '
and subsequently modify it: sFilter := sFilter + ' AND
(AX_SPONTYP='+QuotedStr('P')+')'

At runtime this evaluates to '(AX_ID='WITTMA')  AND (AX_SPONTYP='P')'

After assignment I set 'Filtered := True' and it bombs with error #10051
(says it expects a column name instead of AX_ID but AX_ID IS a field) yet,
as far as I can see, there is nothing wrong with the filter.

Redid it after doing a Repair Table with dbSys (no errors). And, BTW, I get
the same error without the second clause in the filter, ie, with just
'(AX_ID=' + QuotedStr(sCurAID) + ') '.

Help!

Jerry
Sat, Jan 31 2009 11:24 PMPermanent Link

"Jerry Clancy"
Scratch prior message. The field is actually "AX_AID", not "AX_ID". My bad.
And I stared at the error for over an hour and never saw the missing "A".
Never be your own proofreader.

Works fine now.

Jerry

"Jerry Clancy" <jclancy@billtrak.com> wrote in message
news:91DC6300-F623-4500-A802-70F53FE85888@news.elevatesoft.com...
> 4.21 Build 11 with D5 Ent.
>
> I'm getting this error on what appears to be a perfectly good filter
> expression when setting it..The database has an AX_AID string field (6
....
> I assign the following string: sFilter := '(AX_ID=' + QuotedStr(sCurAID) +
> ') '
....
Image