这是我得到的错误:
Server Error in '/' Application.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group) VALUES ('test_user','testpass',13,77,0,0,0,1);SE' at line 9
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: MySql.Data.MySqlClient.MySqlException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group) VALUES ('test_user', 'testpass', 13, 77, 0, 0, 0, 1); SE' at line 9
我环顾四周,有人解释说这可能是mysql缓冲区的问题SELECT is stripped which may indicate some string buffer problems in the MySql drive
我正在使用 MySQL 连接器版本 6.5.4.0
任何帮助表示感谢
根据要求,这是我用来插入的代码:
public bool CreateMember(string username, string password, int age, int residence)
{
Context.Members.AddObject(new MemberEntity { Username = username, Password = password, Age = age, Residence = residence, Banned = false, Locked = false, Online = false, Group = 1 });
return Context.SaveChanges() > 0;
}