Results 1 to 4 of 4

Thread: How do I read .cds files (TClientDataSet)

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2007
    Posts
    12

    Question 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.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2007
    Posts
    12

    Re: How do I read .cds files (TClientDataSet)

    Quote Originally Posted by jmcilhinney View Post
    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?

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: How do I read .cds files (TClientDataSet)

    Quote Originally Posted by QuinRiva View Post
    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width