Hello there,

I'm in the process of learning C# and windows forms. What I'm trying to do is adapt some scripts I have already made using PHP and MySQL to work in a windows environment and GUI. I previously wrote it using PHP because I was already familiar with the language and could output the information I needed to a web browser, so didn't have to mess around with coding a proper GUI, but would now like to do so. I've been trying to work out the best way to do this, so have a few questions:

1) Would I be better off not bothering with MySQL and using MS SQL instead? Ultimately people will be able to download what I am making so I'm not sure which would be the best option in terms of when a user is installing all the necessary bits and pieces.

2) Could I ditch SQL databases entirely and run queries of some sort on flat text files (or excel files)?

3) I've been messing around with DataTables, and data sources of various types. What's the best one for displaying the contents of a database in a window? I'm not sure what the pros and cons are here.

Thanks!

1) I would stay with MySql, depending on what the application is doing. If you go with MSSQL your users would have to pay to license it unless you were to go with the Compact Edition and MySql is free.

2) You could if you want, but it makes more work for you. Working with flat files isn't nearly as easy as working with a database. If it were me I'd stick with SQL Server Compact edition, with that you can embed your database into your application.

3) DataSets are easy to work with. I personally use generics for working with data a lot, I feel they dont have the overhead of some of the data objects in the .Net framework

That sounds great - thanks for the rapid reply! I will definitely take your advice, and from what you're saying it sounds like SQL Server Compact is the way to go. Am I right in thinking that if I include that with my application, I'll be able to have multiple tables and databases all handled within the application itself, rather than having to get any additional programs installed on top?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.