insert into语句报错,头都大了,大虾帮忙看看,在线等,多谢!
在编毕业设计,以前从来没学过asp.net,现在从头开始学,在编用户注册那一块儿时老是insert into语句报错,那一块儿代码是
tsql="insert into UserDatas(account,password,name,right,position,sex,Email)"
tsql=tsql & "values('" & request.form("account") & "','"
tsql=tsql & request.form("PWD") & "','"
tsql=tsql & request.form("name") & "','3','"
tsql=tsql & position.selecteditem.text & "','"
tsql=tsql & sexA & "','"
tsql=tsql & request.form("email") & "')"
错误是:
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: System.Data.OleDb.OleDbException: INSERT INTO 语句的语法错误。
Source Error:
Line 27: objcmd=new oledbcommand(tsql,objconn)
Line 28: dim objreader as oledbdatareader
Line 29: objreader=objcmd.executereader()
Line 30:
Line 31: session("account")=request.form("account")
如果想看详细情况可以加我QQ,115634095,在线等,多谢大家!