Yasskier
Yasskier

Reputation: 811

Automatic installation of .net project with MySQL database

For my uni project I've made a C# program that uses MySQL database. Looking at it now, I think that selecting MySQL wasn't the best solution... at least from the user's point of view.. Yes, there will be actual users of this program (hurray for me!), however installation process is bit problematic since user has to install all dependencies (C++ runtime, .net enviroment, MySQL, ODBC connector, MySQL and database). While I've created a small manual I would prefer to present something simpler. While I've found Auto installer, all it did was copying files. iExpress.exe seems to only run a single file... And still there is a matter of installing the database without opening mwb in MySQL workbench (I do have somewhere .sql file that is in fact used to forward engineer it to the database). Could you guys give me any directions?

EDIT: I've started toying around with creating setup package in VS http://support.microsoft.com/kb/307353 I don't think I can set up order there tho and still doesn't solve the problem of database installaton

EDIT2: Seems that MySQL is a dead end here... IS there maybe an easy way of moving my current database to SqlLite or something that I CAN embed?

Upvotes: 2

Views: 3154

Answers (2)

You can download mysql driver for ODBC from mysql.com and configure the application to use an ODBC connection as an alternative.

http://dev.mysql.com/downloads/connector/

If you won't use a clien-server architecture, of course, you shouldn't use a client-server DBMS. Use sqlite or sql server CE

Upvotes: 0

Namphibian
Namphibian

Reputation: 12221

As per our comment thread above:

Having a MySQL server instance on every client is a bit overkill. There is a couple of problems with this approach.

  1. The installations and configuring is going to be a nightmare.
  2. Maintenance of the database server is also going to be problematic. Backups, security and maintenance of the servers will now require a DBA to go to the clients.

You would need to look at a embedded solution. Some solutions might be SQLLite, SQL CE and even good old Berkley DB. If the information stored on the client is not that relational in nature and you dont require ACID compliant databases you might want to look at storing it is in plain old text files or even XML files.

Essentially you are working on a disconnected record set model. Where connection to a server is not required for the application to work. C# does allow you to store record sets in XML files. You might for example have one central MySQL server download the records to the client application and let the client work on the records locally.

When the client has completed its work then you can (if the network is available) post these changes back to the MySQL server.

The bad news is that is going to take a effort to do this. It wont be major rework but wont be minor as well.

Upvotes: 2

Related Questions