Actually, I never tried opening the query itself, I just noticed that the
CDS is never opened anyway, but is populated with via by calling
CDS.Provider.DataRequest (which seems to be using a different query that the
one linked to the provider to source the data).  In the OnDataRequest event
theres code that looks like:

      with (Sender as TProvider) do begin
        with QryResult do begin
          QryResult.close;
          QryResult.SQL.Clear;
          QryResult.SQL.Add('Select * from Job where job_ref = ' +
intToStr(intJobRef) );
          QryResult.Open;
        end;
        if intJobRef > 0 then begin
          Result := PrvResult.Data;
          qryJob.SQL.Clear;
          qryJob.SQL.Add(qryResult.SQL.Text);
        end
        else
          Result := null;
      end

PrvResult is a TProvider linked to QryResult, from what I can see the code
uses QryResult to select the data, uses its provider to return the data
variant to the first provider, then updates the sql for the first query to
that used in QryResult, but is not opened.  I'm not quite sure if I follow
all this myself, mm my head hurts :(

karm


----- Original Message -----
From: Carl Reynolds <[EMAIL PROTECTED]>
To: Multiple recipients of list database <[EMAIL PROTECTED]>
Sent: Monday, January 15, 2001 6:41 PM
Subject: RE: [DUG-DB]: TField and FieldDefs... dynamicly created persistent
fields...


> 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.


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

Reply via email to