Hi Mark

Because you're adding a field of type fkData the CDS is going to expect to
find the same field in the underlying query.  So in short, yes, you're going
to have to add the field there too.  You say you tried this - were you able
to open the query alone?  Because that's the first thing to check.

As far as doing this sort of thing goes, I remember using DestroyFields,
FieldDefs.Update and CreateFields to generate the default set of fields in a
query from the database, and then merging those with persistent lookup and
calculated fields which were defined on the CDS which referenced it, but
this was several years ago and I don't have the source to it anymore.  If
the kindly folks at CJN are reading this, maybe they could help out?

Cheers,
Carl
---------------------------------------------------------------------------
  New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to