The Reader is always null, i have no idea why.
Before the connection was in one method everything worked fine.
private MySqlConnection connection;
private MySqlCommand command;
private MySqlDataReader Reader;
private void DBint()
string myConnectionString = "SERVER=xxx;PORT=3306;" +
connection = new MySqlConnection(myConnectionString);
command = connection.CreateCommand();
MySqlDataReader Reader;//error occures her
Reader = command.ExecuteReader();
You should set the CommandText property of the command object with your SELECT statement or stored procedure name, you cannot execute an empty command.