Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 7 of 7 total
Thread Filter Record "Field Not Found"
Sun, Mar 1 2009 11:21 AMPermanent Link

Norman L. Kleinberg
OK. Probably something I should know but don't.

Using V 4.26 with Delphi BDS2006. I have a TDBISAMQuery of the form SELECT * FROM........
and an OnFilterRecord handler. In the handler I have several clauses of the form: if
DataSet.FieldByName('XXX').AsString = ....... then Accept := .... but Delphi complains
that it can't find the Field 'XXX', which IS in the originating table.

Did I miss the memo that says you have to have an explicit field list (persistent) when
you use OnFilterRecord? I guess it's possible that in all my years of coding I've never
executed this precise scenario but it's POSSIBLE. Smile

Thanks for any pointers.
Sun, Mar 1 2009 11:49 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Norman


If you have ANY persistent fields defined then any you want to access have to be in the defined persistent fields. Why I do not know but I and several others have fallen foul of this over the years.

If on the other hand you don't have any persistent fields defined for that table - I'm baffled.

Roy Lambert [Team Elevate]
Sun, Mar 1 2009 12:58 PMPermanent Link

Norman L. Kleinberg
Roy:

Yea, THAT I remember and it was the first thing I looked for. NO persistent fields are
defined.

I'm baffled as well, but I'm REALLY good at figuring these codie things out (unlike in my
actual, real world job where I can't do research worth a damn Smile).

Thanks for posting so quickly.


Norman
Sun, Mar 1 2009 1:18 PMPermanent Link

Norman L. Kleinberg
Never Mind.

Think I have it; my code is so complex even I have trouble figuring it out.

Sorry for the bother but just keeping you all on your toes. If it turns out I DON'T have
it figured out then I'll be back. Smile
Sun, Mar 1 2009 1:20 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Norman


Are you reusing the query? Why that should make any difference I don't know but....

Also what can you see if you put code in the OnFilterRecord to show what fields are there?

Roy Lambert [Team Elevate]
Sun, Mar 1 2009 7:15 PMPermanent Link

"Rita"

"Norman L. Kleinberg" <nlkleinberg@hotmail.com> wrote in message
news:C53749EB-441C->

> I'm baffled as well, but I'm REALLY good at figuring these codie things
> out (unlike in my
> actual, real world job where I can't do research worth a damn Smile).
>

I hope u aint the guy doing my blood test. ;-(
Rita

Mon, Mar 2 2009 2:12 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Norman


When you're sure you have figured it out please post what the problem was - it might help someone else.

Roy Lambert [Team Elevate]
Image