4

I don't know much about Delphi / ClientDataSets but I'm willing to look into it. I have a question before I pursue it though, to determine if what I want to achieve is feasible.

I want to use a PHP script to save a dozen subsets of my MYSQL database to CDS files once weekly. Is there a File specification that I can follow to create a CDS file? I'll be running the script on a shared web host using Linux, so I don't think running Delphi scripts on the server is viable.

Thanks!

skibulk
  • 3,088
  • 1
  • 34
  • 42
  • I'm selecting mjn's answer below because it did fulfill my core question. I have not discovered a way to compile the XSD into a CDS, but I have discovered oddly that in my situation, simply naming my XML document as .cds worked with my application. Also see my related question: http://stackoverflow.com/questions/10825916/php-append-to-clientdataset-cds-file – skibulk Jun 01 '12 at 22:21
  • see http://stackoverflow.com/a/9988785/119609 if you need some info about binary format – Vladimir Ulchenko May 31 '12 at 05:56

1 Answers1

1

There is a related question on Stackoverflow which includes a partial XSD:

Anyone that has a partial XSD that describes the METADATA section of Delphi TClientDataSet XML files?

You can use this XSD and an XML library to create XML files from your data which are compatible with TCLientDataSet, so they can be opened in a Delphi application.

I don't know PHP XML libraries, but in many languages XML libraries are able to create mapping code based on the XSD, which then can be used to read and write XML files based on the schema definition.

Community
  • 1
  • 1
mjn
  • 36,362
  • 28
  • 176
  • 378
  • Thanks! Do you know of a link that outlines how I could turn the XSD into a CDS? Remember I cannot run delphi on my server. – skibulk May 30 '12 at 18:27
  • see my edit - it requires a PHP XML library with support for XSD – mjn May 31 '12 at 05:28