How do I read .cds files (TClientDataSet)
I'm trying to access a database which is presently saved in .cds format (which I believe is a TClientDataSet) from within my programme written in VB.Net. The reason being, is that the programme I am writing uses the same database as another programme. Both programmes will never being running at the same time, and it is a read-only operation so I could potentially duplicate the database and convert the database to an SQL-compatible format, but obviously this isn't a tidy solution.
Is there anyway that I can directly read data from the .cds file with VB.Net? It seems like this would be something that is not too complex and wouldn't be too different from just reading a .csv file.
Cheers.
Re: How do I read .cds files (TClientDataSet)
What is a TClientDataSet? That sounds like a class in Delphi. Was the app that wrote the file written in Delphi? Basically you need to know the format of the file so that you can open it and then read the data, either in text or binary format, and interpret the data.
Re: How do I read .cds files (TClientDataSet)
Quote:
Originally Posted by
jmcilhinney
What is a TClientDataSet? That sounds like a class in Delphi. Was the app that wrote the file written in Delphi? Basically you need to know the format of the file so that you can open it and then read the data, either in text or binary format, and interpret the data.
Yes, that's correct, It's a Delphi structure for databases. I can read it as a text file but there's a lot of garbage and it's unformatted (but generally the data is legible). I have also use an aplication called CDS Explorer (by Dave Bhatia) to open and read the file.
VB.Net has a DataSet class and I was wondering if there was a method of reading the Delphi ClientDataSet (the .cds file) into a VB DataSet?
Re: How do I read .cds files (TClientDataSet)
Quote:
Originally Posted by
QuinRiva
VB.Net has a DataSet class and I was wondering if there was a method of reading the Delphi ClientDataSet (the .cds file) into a VB DataSet?
None that I'm aware of and certainly nothing built into the Framework. Someone may have written something but, if not, then you'd have to do it yourself. I would expect that you'd need to use a BinaryReader to read text and binary data from that file. You'll also have to know what the format is so that you know what type of binary data to read.