none
How to create a data file? RRS feed

  • Question

  •  

    Hi. I'm not sure if I'm posting in right place.

    anyway, I want to use single data file instead of using separate database like ms sql. How difficult is it to create a new data file type which will be opened only by my program? How to do this?

     

    e.g.: *.qbw files

    Monday, October 6, 2008 9:28 AM

Answers

  • Hi emilh,

    Are you going to create simple database from scratch? If you are, it will need you to do a lot of work.  However, if you only want to create a simple data file for your own application use only, you can define a data structure for the data file, and write the file to the disk with your own format.

     

    To make the data file for your own application only, you can encrypt the data file before you write it to the disk, and decrypt the data file after you load the IO stream. With this work finished, if other applications attempt to open your data file, only messy code will be seen.

     

    If you have further problems, please feel free to let me know.

     

    Best Regards,

    Bruce Zhou

     

    Windows Forms General FAQs
    Windows Forms Data Controls and Databinding FAQs

     

    Wednesday, October 8, 2008 2:26 AM

All replies

  • Hi emilh,

    Are you going to create simple database from scratch? If you are, it will need you to do a lot of work.  However, if you only want to create a simple data file for your own application use only, you can define a data structure for the data file, and write the file to the disk with your own format.

     

    To make the data file for your own application only, you can encrypt the data file before you write it to the disk, and decrypt the data file after you load the IO stream. With this work finished, if other applications attempt to open your data file, only messy code will be seen.

     

    If you have further problems, please feel free to let me know.

     

    Best Regards,

    Bruce Zhou

     

    Windows Forms General FAQs
    Windows Forms Data Controls and Databinding FAQs

     

    Wednesday, October 8, 2008 2:26 AM
  • Thanks for reply, Bruce. Actually I was going to create a database for custom financial software. It assumes plenty of tables. I don't know if you've been worked with quickbooks. It has only one database file which keeps whole information about a certain company. What can you advise me? I don't have too much time to spent on creating it. MS SQL is too large and expensive. Does .net programming work fine with MySql? I need a database solution to proceed with programming.

     

    Thank you!

    Wednesday, October 8, 2008 4:48 AM
  • Hi emilh,

    I haven‘t worked with quickbooks ever before, so I’m sorry for I can’t provide more information about that to you.

    Based on my experience, .Net can work with MySQL, but you need to download MySQL Connector which is full-managed ADO.NET driver for MySQL.

    I don’t know whether you have considered using Microsoft SQL Server Express Edition which is free.  As you may know, .Net Framework can with fine with Microsoft SQL Server.

    Best Regards,

    Bruce Zhou

     

    Windows Forms General FAQs
    Windows Forms Data Controls and Databinding FAQs

     

    Wednesday, October 8, 2008 5:05 AM
  •  

    Bruce, I forgot that express edition is free... I think that's the one I need. And the fact that it supports databases up to 4GB makes it suitable for me.

     

    Thank you for help!

    Wednesday, October 8, 2008 8:10 AM
  • You are welcome, glad I can help you out.

     

    Wednesday, October 8, 2008 8:18 AM