<%
' 建立Connection 对象
Set conn = Server.CreateObject("ADODB.Connection")
Provider = "Provider=Microsoft.Jet.OLEDB.4.0;"
DBPath = "Data Source=" & Server.MapPath( "kaoshi.mdb" )
' 连接数据库
conn.Open Provider & DBPath
Set rs = Server.CreateObject("ADODB.Recordset")
' 打开信息源,参数二为Connection对象
rs.Open "internet", conn, 2, 2
%>
sql="select * from internet"
set rs=conn.execute(sql)
if not rs.eof then
%>
姓名 |
选择 |
操作 |
小测 |
总成绩 |
<%do while not rs.eof%>
<%=rs("Name")%> |
<%=rs("xzsum")%> |
<%=rs("caozuo")%> |
<%=(rs("ceshi1")+rs("ceshi2")+rs("ceshi3")+rs("ceshi4")+rs("ceshi5"))%> |
<%=(rs("xzsum")+(rs("caozuo")+(rs("ceshi1")+(rs("ceshi2")+(rs("ceshi3")+(rs("ceshi4")+(rs("ceshi5"))%> |
<%
rs.movenext
loop%>
<%else
response.write "暂无相关记录"
end if
conn.close
set conn=nothing
set rs=nothing%>