Subject Re: [IBO] Parser messes up SQL containing FIRST
Author Helen Borrie
At 12:18 PM 14/10/2003 +0000, you wrote:
> > To get rid of the DB_KEY, simply set the KeyLinks to the primary
> > key column(s) of the table. It will have to be more than just
> > ID, apparently, otherwise you wouldn't use SELECT FIRST.
>This made me check my settings. I was originally using
>KeyLinksAutoDefine=True for my query. After I set this property to
>false and specified the KeyLinks manually, the statement was parsed
>correctly at runtime.
>I'm still getting an error at design time, though. However, it doesn't
>occur during preparation, but rather during opening/closing of the
>This is the message:
>Invalid custom DML column reference: RDB$DB_KEY.

It's probably a relic in one or more of your ***SQL properties from the
previous bad Keylinks setting. Just inspect them and take them out.

>Things seem to work at runtime, which is what really matters to me.
>But I'm still intrigued... Does this mean that automatic key links
>generation is broken somehow? Any special reason for this? And what
>about this DML message I'm getting at design time?

Automatic keylinks only works if you have a primary key on the table. It
doesn't work with joined sets or views, either.