请各位帮我看看哦的问题
cz494 2003-09-28 12:00:34 Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e14'
[Microsoft][ODBC Microsoft Access Driver] INSERT INTO 语句的语法错误。
/lao1/cjcxinput.asp,行36
源码如下
<!--#include file="dbconn.asp"-->
<!--#include file="sqlstr.asp"-->
<%
Set rec = Server.CreateObject("ADODB.RecordSet")
actions = Request("actions")
loginMsg = "(请先登陆)"
msgInfo = ""
if actions = "alogin" then
username = Request("username")
password = Request("password")
sql = "select * from studentinfo where usertype='A' and CollegeNo='" & username & "'"
if iExistRecord(sql) then
rec.open sql,conn,1,3
if rec("password") = password then
session("cjcxinput") = true
end if
rec.close
end if
if session("cjcxinput") <> true then
logError = "[登陆错误!请重新登陆]"
end if
end if
if session("cjcxinput")= true then loginMsg = "(您已成功登陆)"
if actions = "ainput" and session("cjcxinput")=true then
iID = sqlstr(Request("icID"))
iDT = sqlstr(Request("icDT"))
iZY = sqlstr(Request("icZY"))
iYear = sqlstr(Request("icYear"))
iName = sqlstr(Request("icName"))
iCollege = sqlstr(Request("icCollege"))
'sql0 = "s"
sql1 = "select * from studentinfo where usertype='S' and CollegeNo=" & iID & ""
sql2 = "select * from success where collegeno =" & iID & " and termyear=" & iYear
if Not iExistRecord(sql1) then
ssql = "insert into studentinfo (CollegeNo,PassWord,regDT,zhuanye,name) values("&iID&",'123456',"&iDT&","&icZY&","&iName&")"
conn.execute ssql
msgInfo = "<li>学号" & iID & "已经存入数据库,初始密码123456"
end if
if Not iExistRecord(sql2) then
ssql = "insert into success(CollegeNo,termYear,success) values("&iID&","&iYear&"," &iCollege& ")"
conn.execute ssql
msgInfo = msgInfo & "<li>学号" & iID & "成绩已经存入数据库"
else
ssql = "update success set success=" & iCollege & " where collegeno =" & iID & " and termyear=" & iYear
conn.execute ssql
msgInfo = msgInfo & "<li>学号" & iID & "成绩已经修改"
end if
end if
%>
<%
'■----------------------------------------------------------------■
'| /-/-/-/-/-->> 本页相关函数 <<--/-/-/-/-/ {Coding by Chfeng.Wu} |
'■----------------------------------------------------------------■
'↓ ↓
'├//记录存在判定
Function iExistRecord (esql)
rec.Open eSql,Conn,1,3
If Not rec.Eof Then
iExistRecord = True
Else
iExistRecord = False
End If
rec.Close
End Function
'↑ Function End ↑
'■----------------------------------------------------------------■
'
%>