<!--c13_4_1.asp-->
<html>
<head><title>股票行情表</title></head>
<body>
<center>
<p><img src="title.jpg"></p>
<%
Set cnObj = Server.CreateObject("ADODB.Connection")
dbpath = Server.MapPath("DB.mdb")
cnObj.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbpath
cnObj.Open Access,1,1
Set rsObj = cnObj.Execute("股票行情表")
%>
<table border="2" cellpadding="5" cellspacing="5">
<tr bgcolor="#99FFFF">
<%
For i = 0 To rsObj.Fields.Count - 1
Response.Write "<th>" & rsObj.Fields(i).Name & "</th>"
Next
%>
</tr>
<%
Do While Not rsObj.EOF
Response.Write "<tr>"
For i = 0 To rsObj.Fields.Count - 1
Response.Write "<td>" & rsObj.Fields(i).Value & "</td>"
Next
Response.Write "</tr>"
rsObj.MoveNext
Loop
cnObj.Close
Set rsObj = Nothing ' 将rsObj设为Nothing,表示释放rsObj对象的资源
Set cnObj = Nothing ' 将cnObj设为Nothing,表示释放cnObj对象的资源
%>
</table>
</center>
</body>
</html>
Microsoft JET Database Engine 错误 '80004005'
未指定的错误
/ch13/c13_4_1/c13_4_1.asp,行 12