连不上数据库 谁能帮我找出错误 跪谢
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ Language=VBScript %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>jjjjj</title>
<body>
<hr color="red" siz="1" noshade>
<div align="center">
<%
writer
dim cnn,rst,sql,currentPage,rowCount,i
currentPage=Request.QueryString("currentPage")if currentPage="" then
currentPage=1
end if
Application("sql")="DBQ="+server.MapPath(""+";pwd=;DRIVER={Microsoft Access Driver (*.mdb)};"
set cnn=server.CreateObject("ADODB.Connection")cnn.Open "PROVIDER=SQLOLEDB;DATA SOURCE=localhost;"& _"UID=sa; PWD="";DATABASE=A911"
set rst=server.CreateObject("ADODB.Recordset" )
rst.CursorType=adOpenStatic
rst.PageSize=5
sql="SELECT * FROM fei3"
rst.open cnn,sql,3,2rst.AbsolutePage =Cint(currentPage)
rowCount=0
<%
<table border="0" cellpadding="2" cellpadding="2" width="100%">
<tr bgcolor="#0084ca">
<th>作者</th><th>地址</th>
</tr>
<% while not rst.EOF and rowCount < rst.PageSize %>
<tr bgcolor="#d9f2ff">
<td><%=rst("ID1")%></TD>
<td><%=rst("pass")%></td>
</tr>
<%
rowCount=rowCount+1
rst.Movenext
wend
%>
</table>
<p>当前主题页数<% = rst.RecordCount %>
每页<%=rst.PageSize %>个主题
当前页次:<% = currentPage %>/<% =rst.PageCount %>页
<%
for i=1 to rst.PageCount
if i=Cint(currentPage) then
%>
[<font color="red"><% =i %></font>
Else
<p>fdsfdsfsd</p>
%>
</div>
</body>
</head>
</html>
解决方案 »
- Ajax control toolkit安装后,有些控件不能拖放到页面
- 按钮如何在图片上面 说不太清 截张图
- 放了一个linkbutton控件,为什么会弹出这样的错误?
- 在这里问下.net 数据库的连接池 连接池的数目最好设置多少才好呢?是根据访问人数来说的还是默认的一个值就行呢
- CheckBoxList 如何用验证控件控制选择个数
- 如何在Tableadapter中实现多表查询?
- 为什么我的cookie只在添加该cookie的页面有效?
- 查询中 DataSet 过大,怎么办?
- VS2005中,怎么使用角色
- 我想ASP.net网站开发
- 求创建“IIS6的应用程序池”asp.net(C#)源代码
- 请问,用asp.net 如何团队开发网站
->cnn.Open "PROVIDER=SQLOLEDB;DATA SOURCE=localhost;UID=sa;