AFAIK, it should use the CDS's persistent fields, correct.

A few more general comments:
1.      Add new field def's before opening the CDS.
2.      Do not call CreateDataSet if you are linked to a query, even for
inserting records
3.      To add a new record just call CDS.Insert and CDS.Post, you can do
this in a loop if required.
4.      Once you are finished with inserting (or editing) call
CDS.ApplyUpdates

Cheers
Martin

                -----Original Message-----
                From:   Mark Derricutt [mailto:[EMAIL PROTECTED]]
                Sent:   Monday, January 15, 2001 16:37
                To:     Multiple recipients of list database
                Subject:        Re: [DUG-DB]: TField and FieldDefs...
dynamiclycreatedpersisten t fields...

                The call to CreateDatSet is in the "new record" bit of the
code, to create a
                blank/empty dataset.  seeing as the CDS already has
persistent fields, won't
                it use them instead of the tqueries?

                ----- Original Message -----
                From: Martin Ease <[EMAIL PROTECTED]>

                > Don't call CDS.CreateDataSet, just call CDS.Open, this
will open the
                linked
                > query and create the data set based on Tquery's persistent
field def's.
                >
                > If you have a problem with this approach try adding the
TfieldDefs to your
                > CDS, but not both!


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

                "WS SMTP relay" made the following
                 annotations on 01/15/01 16:32:01
        
----------------------------------------------------------------------------
--

                [INFO] -- Content Manager:
                [MMSSOV] Please note that the e-mail system is provided for
business purposes only.

        
============================================================================
==

"WS SMTP relay" made the following
 annotations on 01/15/01 16:42:42
------------------------------------------------------------------------------

[INFO] -- Content Manager:
[MMSSOV] This e-mail message and any attachments are confidential to Sovereign Limited 
and subsidiaries and subject to legal privilege. If you have received this e-mail in 
error, please advise the sender immediately and destroy the message and any 
attachments.  If you are not the intended recipient you are notified that any use, 
distribution, amendment, copying or any action taken or omitted to be taken in 
reliance of this message or attachments is prohibited.

==============================================================================

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

Reply via email to