且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

连接必须有效且打开错误

更新时间:2022-11-11 09:55:13

您需要告诉您的命令有关您的连接对象的信息. 将连接参数添加到此行:

You need to tell your command about your connection object. Add the connection parameter to this line:

MySql.Data.MySqlClient.MySqlCommand myCommand = new MySql.Data.MySqlClient.MySqlCommand(insertQuery, connection);