大家帮看一下这条语句哪儿错了
string sql ="insert into User ([bo]UID[/bo],[bo]DeparmentID[/bo],[bo]Name[/bo],[bo]PassWord[/bo],[bo]Sex[/bo],[bo]Address[/bo],[bo]Phone[/bo],[bo]Email[/bo],[bo]Role[/bo]) values (@UID,@DeparmentID,@Name,@PassWord,@Sex,@Address,@Phone,@Mail,@Role)";
OleDbParameter[] para = new OleDbParameter[]
{
new OleDbParameter("@UID",user.UID),
new OleDbParameter("@DeparmentID",user.UDepartment.DepartmentID),//FK
new OleDbParameter("@Name",user.UserName),
new OleDbParameter("@PassWord",user.UPassWord),
new OleDbParameter("@Sex",user.USex),
new OleDbParameter("@Address",user.UAddress),
new OleDbParameter("@Phone",user.UPhone),
new OleDbParameter("@Mail",user.UEmail),
new OleDbParameter("@Role",user.URole.RoleID) //Fk
};
return DBHelp.ExecuteCommand(sql, para);
执行的时候说“insert into 语句语法错误”这对Access数据库进行操作