I have to use this string to connect to my database in C#.
connectionString="Server=localhost; database=Flight_log_db; Uid=root; Pwd=admin";
connection=new MySQLConnection
The problem is that this throws an error when I try to open the connection because it does not know what the database is. I used the same name as the database model because I had no choice when I forward engineered the model. But I cannot connect because I get the above error, or when I do not include the database name and I get to the
MySqlCommand cmd = new MySqlCommand(sql, connection);
MySqlDataReader reader = cmd.ExecuteReader();
lines I get the error that no database was selected;
Where is the database?
connectionString="Server=localhost; database=Flight_log_db; Uid=root; Pwd=admin";
connection=new MySQLConnection
The problem is that this throws an error when I try to open the connection because it does not know what the database is. I used the same name as the database model because I had no choice when I forward engineered the model. But I cannot connect because I get the above error, or when I do not include the database name and I get to the
MySqlCommand cmd = new MySqlCommand(sql, connection);
MySqlDataReader reader = cmd.ExecuteReader();
lines I get the error that no database was selected;
Where is the database?