日期:2014-05-17  浏览次数:20903 次

高手来看看这个程序怎么改正,我课本的,也错,晕
<!--#include   file=adovbs.inc   -->
<html>
<body   bgcolor=pink>
<%
session( "flag ")=9
set   session( "rs ")=server.createObject( "adodb.recordSet ")
constr= "provider=sqloledb;data   source=XING-AE809AD14D;initial   catalog=tx1;user   id=sa;password=; "
session( "rs ").cursorlocation=aduseclient
sql= "select   *   from   t_student "
session( "rs ").open   sql,constr,adopenkeyset,adlockreadonly,adcmdtext
%>

<table   border= "1 "   bordercolor= "#000000 "   cellspacing= "1 "   cellpadding= "0 "   align= "center ">
<tr   align=center   valign=middle   height=23>
<td> <b> 学号 </b> </td>
<td> <b> 姓名 </b> </td>
<td> <b> 性别 </b> </td>
<td> <b> 电话 </b> </td>
<td> <b> 籍贯 </b> </td>
<td> <b> 班级 </b> </td>
<td> <b> 民族 </b> </td>
</tr>
<%
session( "start ")=session( "rs ").absoluteposition
for   j=0   to   session( "flag ")-1
response.write   " <tr   align=center   valign=middle> "
session( "end ")=session( "rs ").absoluteposition
for   i=0   to   session( "rs ").fields.count-1
response.write   " <td> "&session( "rs ").fields(i).value& " </td> "
next
response.write   " </tr> "
session( "rs ").moveNext
if   session( "rs ").eof   then
session( "rs ").movePrevious
exit   for
response.write   " </table> "
%>
<!--#include   file=link.asp   -->
link.asp的代码:
<%response.Write   " <br> 数据总条数: "&session( "rs ").recordcount& " "
if(session( "rs ").eof)or(session( "end ")> =session( "rs ").recordcount)   then
response.write   "[ <a   href= " "query.asp?method=previous " "> 上一页 </a> | "
response.write   "下一页] "
elseif((session( "rs ").bof)or(session( "start ")=1))   then
response.write   "[上一页| "
response.write   " <a   href= " "query.asp?method=next " "> 下一页 </a> ] "
else
response.write   "[ <a   href= " "query.asp?method=previous " "> 上一页 </a> | "
response.write   " <a   href= " "query.asp?method=next " "> 下一页 </a> ] "
end   if
response.Write   "开始记录: "&session( "start ")& ",结束记录: "&session( "end ")& ". "
%>
调试错误为:
HTTP   错误   500.100   -   内部服务器错误   -   ASP   错误
Internet   信息服务

--------------------------------------------

技术信息(用于支持人员)

错误类型:
Microsoft   VBScript   编译器错误   (0x800A03F6)
缺少   'End '
/个人网站/link.asp,   第   12   行


浏览器类型:
Mozilla/4.0   (compatible;   MSIE   6.0; &n