<%@LANGUAGE="VBSCRIPT" CODEPAGE="CP_ACP"%> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>无标题文档</title> </head>
<body> <% const adcmdtable=&h0002 const adopenkeyset=1 const adlockoptimistic=3 set dbconnection=server.createobject("adodb.connection") connectionstring="provider=Microsoft.jet.oledb.4.0;data source=" & server.mappath("office.mdb") dbconnection.open connectionstring fhsql="select * from teacher" set rs=server.CreateObject("adodb.recordset") rs.open fhsql,dbconnection,adopendynamic,adlockoptimistic,adcmdtable %> <% if request.Form("name")<>"" then rs.addnew rs.fields("姓名")=request.form("name") rs.fields("性别")=request.form("sex") rs.fields("毕业院校")=request.form("school") rs.fields("所任学科")=request.form("subject") rs.fields("技术职务")=request.form("job") rs.fields("联系方式")=request.form("contact") rs.update rs.close response.write "记录添加成功!" end if %> <center><table border=1> <tr bgcolor=#00ffff> <% for i = 0 to rs.fields.count-1 response.write "<td>" & rs(i).name & "</td>" next %> </tr> <% rs.movefirst while not rs.eof row="<tr bgcolor=#ffff00>" for i = 0 to rs.fields.count-1 row=row & "<td>" & rs(i) & "</td>" next response.write row & "</tr>" rs.movenext wend %> </table></center>
<% rs.pagesize=5 if not isempty(request("topage")) then topage=cint(request("topage")) if topage >rs.pagecount then rs.absolutepage=rs.pagecount elseif topage <=0 then rs.absolutepage=1 else rs.absolutepage=topage end if end if %>
</body> </html>
由谁帮我年看错在那儿了?
错误信息是:
Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
Microsoft JET Database Engine
FROM 子句语法错误。
/star/a/display.asp,行56
谁帮我解决决此事,我重赏!!!!!!!!!!!!!!!!!!