【发布时间】:2013-06-17 13:45:18
【问题描述】:
请求未执行:
mycmd = new MySqlCommand();
mycmd.CommandText = "INSERT INTRO 'users' (userid, username, password, ipaddr, port, channel, inbox, inboxadm, access, other) VALUES (NULL, 'username2', 'password2', NULL, NULL, 'channel2', NULL, NULL, 'access2', NULL);";
mycmd.Connection = mconnection;
mycmd.Parameters.AddWithValue("username2", message.Login);
mycmd.Parameters.AddWithValue("password2", message.Password);
mycmd.Parameters.AddWithValue("channel2", "channel");
mycmd.Parameters.AddWithValue("access2", 0);
mycmd.CommandType = CommandType.Text;
mycmd.ExecuteNonQuery();
帮助查找并纠正请求中的错误。
例如 phpmyadmin SQL 查询:
INSERT INTO `shachat`.`users` (`userid`, `username`, `password`, `ipaddr`, `port`, `channel`, `inbox`, `inboxadm`, `access`, `other`) VALUES (NULL, 'myacc', 'mypass', NULL, NULL, 'administratorY', NULL, NULL, '9', NULL);
【问题讨论】:
-
请说明您收到的错误信息
-
可能有助于指定您的错误,为我们定义架构,并添加任何其他相关详细信息。
-
错误不存在,在“mycmd.ExecuteNonQuery ();”之后什么也没发生。