I need to read Files that are written with the TClientDataset class from Delphi with .NET Code. The Solution mentioned here does not work for me.

有帮助吗?

解决方案

"A dotNet program that does not run on Windows platform" means to me that you're deploying a Mono application. Possibly on Linux, if that's the case try WINE and see if the Delph app suggested above works as expected. If yes, your problem of leaving the dotnet app machine is solved as both will run on the same hardware without communication through network.

EDIT: since the OP now specified that he's using MonoDroid and Monotouch, and therefore can't use Wine- the remaining options are:

  • Reverse engineer the format (consult a lawyer first to protect yourself from harm)
  • Ask Embarcadero for a definition of the file ( I don't put much hope on it)
  • Modify the Delphi/C++ Application to export the files in XML
  • Create an Delphi application to preprocess those *.cds and export them to XML before sending them to the iOS / Android machine.

Of the four alternatives, the fourth one is possibly the fastest - the best one is the third.

The first one can get you in trouble because of all those laws against rev engineer around the world ( in USA there are DMCA which I heard is very draconian - but IANAL and not even an US-citizen).

The second one is a bet.

其他提示

You need to use Delphi to write a small app to read the cds file and write its contents to a file that you can read from .Net (you choose the appropriate format). You can download free trial versions of Delphi. You can develop the app on a separate pc. You can ftp the input *.cds file from your problematic platform to the pc where this new app will reside. You then run the app and ftp the newly created output file to your problematic platform, then read it with .Net.

You can move files from one platform to another with ftp. No reason to lock yourself into one platform if there's a nice tool you need to use (or about to make!) on another platform. :-)

actually original cds binary format IS documented quite extensively in corresponding US patent filed by Hejlsberg/Hansen. I must admit that later borland extended it with few extra features (such as nested datasets support) but basically it is still the very same format and with little digging in midas sources (they released it back in d2010) one can build his own parser as I did

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top