As I understand, he's looking for an "Automated" way to create
VCL-components on the fly, in this case TClientDataSets, not the table-data
that is IN a TClientDataSet.

You might want to investigate the TReader and TWriter objects, which Delphi
internally uses to stream-in and -out DFM-files.

Greetz,

Peter.

  -----Oorspronkelijk bericht-----
  Van: [email protected] [mailto:[email protected]]namens
Robert Jenkins
  Verzonden: zaterdag 31 oktober 2009 4:55
  Aan: [email protected]
  Onderwerp: Re: [delphi-en] Creating persistent objects on the fly


    While I have not tried this, I did notice the TClientDataSet has a
  SaveToFile method.

  Here is what the help file has to say on the subject:

  Call *SaveToFile* to write a client dataset's data to an external file for
  later use by this or other client datasets.

  FileName is the name of the external file to use. If the file already
  exists, its current contents are overwritten. If an empty string is passed
  for the FileName <DBClient.TCustomClientDataSet.FileName.html> parameter
  (or, in Delphi, if this parameter is omitted), the data is saved to the
file
  specified by the FileName
  <DBClient.TCustomClientDataSet.FileName.html>property.

  Format indicates what format to use when saving the data, binary
(dfBinary)
  or XML (dfXML), or UTF8-based XML (dfXMLUTF8).

  Robert

  On Fri, Oct 30, 2009 at 9:01 PM, emmanuellamy <[email protected]> wrote:

  >
  >
  > Hi everyone,
  >
  > I am working that project where I will have to create TClientDataset
  > objects on the fly. Now I am wondering if there is a mechanism, or
technics
  > to save the newly created objects to disk (like in a .dfm file), so I
don't
  > have to re-create objects that I already have created. Any hints
welcome.
  > TIA.
  >
  > Emmanuel
  >
  >
  >

  [Non-text portions of this message have been removed]



  


[Non-text portions of this message have been removed]

Reply via email to