im getting this error while trying to connect a mysql database to an editor, here is the code behind:
protected void Button1_Click(object sender, EventArgs e)
{
Change the line
MySqlCommand cmd = new MySqlCommand("SELECT tes FROM ins");
To
MySqlCommand cmd = new MySqlCommand("SELECT tes FROM ins", conn);
And it should work.
Alternatively assign conn to the cmd.Connection property.
The problem with your code is that you never assign a connection to the command, hence the error saying that the connection is not initialized.