[Visual studio] coupling to a MySQL database - Helena61/-bookshelf GitHub Wiki
- download to the MySQL-driver for .NET (https://www.mysql.com/products/connector/) -> msi-file
- install the msi-file
- Visual Studio :
- create your project.
- use configuration-file (menu: Project -> Properties -> Settings)
- Settings -> name = 'setting', type ='connection string', scope = 'application', value = .
- creates an entry in the App.config-file (see the
name
) - 'Solution Explorer' -> References -> 'Add reference' -> MySQL.Data
Here name
= Bookshelf.Properties.Settings.Setting
static string dbConnection = ConfigurationManager.ConnectionStrings["Bookshelf.Properties.Settings.Setting"].ConnectionString;
MySqlConnection conn = new MySqlConnection(dbConnection);
MySqlCommand typeCommand;
MySqlDataAdapter typeAdapter;
DataTable typesTable;
CurrencyManager manager;