主题:请高手指教 数据库连接出问题
[b]页面显示为[/b]ADODB.Recordset 错误 '800a0e7d'
连接无法用于执行此操作。在此上下文中它可能已被关闭或无效。
/People_new/index.asp,行 380
<% set rs=server.createobject("adodb.recordset")
sql="select * from zp where Zpost<>"" and zjob<>"" order by Zid desc"
rs.open sql,conn,1,1[b]这是第380行[/b]
jobnum=rs.recordcount
rs.close
sql="select top 32 * from company where Cname<>""' order by Clasttime desc"
rs.open sql,conn,1,1
r1=rs.recordcount
c=0%>
<% do while not rs.eof %>
<TR valign="middle">
<TD width="50%" height="16"> <IMG border=0 height=10 src="images/tt1.gif" width=10>
<a href="company/com_view.asp?Cid=<%=rs("Cid")%>" target="_blank">
<% if len(rs("cname"))>13 then%>
<%=Left(rs("cname"),13)%>...
<% else%>
<%=rs("cname")%>
<%end if%>
conn是下面的
<% session.Timeout=5
Set Conn = Server.CreateObject("ADODB.Connection")
set conn1=server.createobject("adodb.connection")
DBPath = Server.MapPath("/people_new/parttime/parttime.mdb")
conn1.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
%>
连接无法用于执行此操作。在此上下文中它可能已被关闭或无效。
/People_new/index.asp,行 380
<% set rs=server.createobject("adodb.recordset")
sql="select * from zp where Zpost<>"" and zjob<>"" order by Zid desc"
rs.open sql,conn,1,1[b]这是第380行[/b]
jobnum=rs.recordcount
rs.close
sql="select top 32 * from company where Cname<>""' order by Clasttime desc"
rs.open sql,conn,1,1
r1=rs.recordcount
c=0%>
<% do while not rs.eof %>
<TR valign="middle">
<TD width="50%" height="16"> <IMG border=0 height=10 src="images/tt1.gif" width=10>
<a href="company/com_view.asp?Cid=<%=rs("Cid")%>" target="_blank">
<% if len(rs("cname"))>13 then%>
<%=Left(rs("cname"),13)%>...
<% else%>
<%=rs("cname")%>
<%end if%>
conn是下面的
<% session.Timeout=5
Set Conn = Server.CreateObject("ADODB.Connection")
set conn1=server.createobject("adodb.connection")
DBPath = Server.MapPath("/people_new/parttime/parttime.mdb")
conn1.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
%>