提示INSERT INTO 语句的语法错误
语句如下:
sql2 = "insert into Student ( Stu_ID,PassWord,Name,Sex,Department,Grade,Class ) values ( ' " + userid + " ', ' " + pwd + " ', ' " + uname + " ', ' " + sex + " ', ' " + depart + " ', ' " + grade + " ', ' " + uClass + " ') ";
把Class改成[Class]还是提示这样的错误~
请高手帮忙看看错在哪里~
------解决方案--------------------------------------------------------
sql2 = "insert into [Student] ( [Stu_ID],[PassWord],[Name],[Sex],[Department],[Grade],[Class] ) values ( ' " + userid + " ', ' " + pwd + " ', ' " + uname + " ', ' " + sex + " ', ' " + depart + " ', ' " + grade + " ', ' " + uClass + " ') "
这样试下