Reputation: 43
I developed application form using C# and connected this application with a MySQL database like this
string Coonstring = "datasource=localhost;port=3306;username=root;password=***;Charset=utf8";
string cmd = "select name from project.material ;";
MySqlConnection connectionDatabase = new MySqlConnection(Coonstring);
MySqlCommand cmddata = new MySqlCommand(cmd, connectionDatabase);
MySqlDataReader myreader;
When I try to build this app. and create setup file and get this setup file to another laptop error messagbox appear tell me missing MySQL host.
So what should I do ?
Upvotes: 0
Views: 1204
Reputation: 67928
*.exe.config
file.string Coonstring = ConfigurationManager
.ConnectionStrings["KeyValueYouSupplied"]
.ConnectionString;
Upvotes: 2