错误类型:
Microsoft OLE DB Provider for SQL Server (0x80040E14)
第 1 行: '=' 附近有语法错误。
/exam/inc/function.asp, 第 206 行
function score(intPrjID,intStudentID)
dim dtmStartTime,dtmEndTime,intMark,intLimitTime
'首先判断此试卷能否进行打分处理
if G_CONN.execute("select count(*) as reccount from prj_student where state<>1 and "_
& "prjid=" & intPrjID & " and studentid=" & intStudentID) ("reccount") = 0 then(错误在此处)
score = false
else
'取得此考试的限制时间及进行考试的开始时间并计算出考试的结束时间
intLimitTime = G_CONN.execute("select limittime from project where prjid=" _
& intPrjID)("limittime")
dtmStartTime = G_CONN.execute("select starttime from prj_student where prjid=" _
& intPrjID & " and studentid=" & intStudentID)("starttime")
if DateDiff("n",dtmStartTime,Now()) > intLimitTime then
dtmEndTime = FormatDatetime(dtmStartTime,2) & " " _
& FormatDatetime(TimeSerial(Hour(dtmStartTime),Minute(dtmStartTime) _
+ intLimitTime,Second(dtmStartTime)),3)
else
dtmEndTime = Now()
end if
'计算出考试试卷的得分
intMark = G_CONN.execute("select count(*) as recmark from prj_process P_P,subject "_
& "S where P_P.answer=S.answer and P_P.prjid=" & intPrjID & " and P_P.studentid=" _
& intStudentID & " and P_P.subid=S.id and (S.type=1 or S.type=3)")("recmark")
intMark = intMark + G_CONN.execute("select count(*)*2 as recmark from prj_process"_
& " P_P,subject S where P_P.answer=S.answer and P_P.prjid=" & intPrjID _
& " and P_P.studentid=" & intStudentID & " and P_P.subid=S.id and S.type=2")("recmark")
'将得分填入考试计划考生表(prj_student)并修改考试状态为已考
G_CONN.execute "update prj_student set state=1,endtime=#" & dtmEndTime _
& "#,mark=" & intMark & " where prjid=" & intPrjID & " and studentid=" & intStudentID
score = true
end if
end function
%>