Binary File and Dataset Winforms C# RRS feed

  • Question

  • Hello everybody,

    I need help!

    I have an unknown binary data file (e.g. test.bin) but I don't know it structure.I want to load it into dataset ...add or remove record from dataset and save the file again.

    Any help please!!!

    Thanks in advance.

    • Moved by Chester Hong Monday, March 18, 2013 8:56 AM DataSet question
    Friday, March 15, 2013 11:47 PM

All replies

  • You ought to notice that DataSets are actually closely bound to the structure of the underlying "physical" data-model. They are strongly typed "in-memory" representations of the data model if the model has finer integration with .NET.

    What this means is, without knowing what the structure of your data-model is, it is impossible to load it to a DataSet. Not only the structure, but even the types are important if you want to code-painlessly.

    You can perhaps use file IO facilities to make an educated-guess of the structure and types. But that is a trial and error method.


    Saturday, March 16, 2013 4:45 AM
  • Best option is to contact the author. It would be un-wise to make attempts at modifying such as file as it may very well corrupt it beings you have no idea of the structure. Even when knowing the structure there are cases that data can be read and written to in .NET where the namespace must match the same namespace used to originally create the file, I know this from doing so myself.

    Enjoy life

    Saturday, March 16, 2013 7:27 AM
  • I don't see any relation to the Graphical User Interface Windows Forms in your questions for which this forum is intended. 

    The forum for datasets is this one


    The forum for C# is this one



    Saturday, March 16, 2013 9:29 AM
  • Hi Az-Eddine,

    I would like to move this thread to ADO .NET DataSet forum since this is a DataSet question. You may get more response in the forum.

    Thanks for your understanding and support.

    Best regards,

    Chester Hong
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, March 18, 2013 8:56 AM
  • The first thing you need to do whatever it is, is getting the data. 

    For that you need to know the structure of the file. 

    Be aware that the  bin extension denotes a binary file. Mostly is that created by C or C++ programs and in fact in a kind of protected way. 

    It is even possible that the data is encrypted. 

    Putting data in a DataSet is easy, in fact you create an collection of items.



    Monday, March 18, 2013 9:20 AM