字典中不存在给定的键。
说明:执行以下操作时发生未处理的异常 当前的Web请求。请查看堆栈跟踪以获取更多信息 有关错误及其在代码中起源的信息。
异常详细信息:System.Collections.Generic.KeyNotFoundException: 字典中不存在给定的键。
MySqlConnection con = new MySqlConnection("Data Source=localhost; Database=gransells; User ID=root; Password=PASSWORD;");
mysqlcommand cmd = new mysqlcommand("select description from product where productId=1",con);
MySqlDataAdapter adapter = new MySqlDataAdapter(cmd);
DataSet ds = new DataSet();
adapter.Fill(ds);