我的global.asa文件内容如下:
<script language =vbscript runat =server >
sub session_onend
dim objcomm
set objcomm=server.CreateObject("adodb.command")
objcomm.activeconnection="Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial _& Catalog=examj;Data Source=10.0.0.12"
objcomm.commandtext="update stu_data set ok=0 where stu_class=" & session("class") & " and stu_id=" & session("id") & ";"
objcomm.commandtype=adcmdtext
objcomm.execute
set objcomm=nothing
session.abandon
end sub
</script>
注:这是一个测试系统,目的是在学生关闭浏览器以后,就把试卷封闭了,不能再打开这个试卷查看了
[此贴子已经被作者于2006-7-30 23:00:38编辑过]