我在使用 asp 脚本从数据库中获取数据时遇到问题,在运行下面的代码后,我只有一个空白页。有人可以帮忙吗?
<% Response.Buffer = True %>
<% Response.Expires = 0%>
<!--#include file="dsn.inc"-->
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Search Results</title>
</head>
<body>
<font face="Arial Narrow">
<%
Set rst = Server.CreateObject("ADODB.Recordset")
If LCase(Request("clearsql")) = "y" Then
strSQL = "SELECT * from npic.dbo.LMSWeb"
Session("sql") = strSQL
Else
strSQL = Session("sql")
End If
rst.Open strSQL, strDSN
%>
<table border="1" width="100%">
<tr>
<td align="center" width="212"><font face="Arial Narrow"><b>Agent Name </b>
</font></td>
<td align="center" width="140"><b><font face="Arial Narrow">Sup</font></b><font
face="Arial Narrow"><b> Name </b>
</font></td>
<td align="center"><font face="Arial Narrow"><b>Date</b></font></td>
<td align="center"><font face="Arial Narrow"><b>Points</b></font></td>
<td align="center"> </td>
</tr>
<%
Dim strError
Do While Not rst.EOF
Response.Write "<tr>" & Chr(10)
Response.Write " <td>" & rst("agent name") & "</td>" & Chr(10)
Response.Write " <td>" & rst("sup") & "</td>" & Chr(10)
Response.Write " <td>" & rst("date") & "</td>" & Chr(10)
Response.Write " <td>" & rst("points") & "</td>" & Chr(10)
Response.Write "</tr>" & Chr(10)
rst.MoveNext
loop
rst.Close
Set rst=Nothing
%>
</table>
</center></div>
</body>
</html>
我在使用 asp 脚本从数据库中获取数据时遇到问题,在运行上面的代码后,我只有一个空白页。有人可以帮忙吗?