技术信息(适用于支持人员)
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
/index.asp, 第 30 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MyIE2)
---------------------------------------------------------------------------------
奇怪,怎么回事,上网搜了一下也没弄明白,以下是我的代码……
<!--#include file="top.asp" -->
<!--#include file="login2.asp" -->
<!--#include file="config.asp" -->
<table width="810" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="248"><table width="100%" height="110" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<%
set rs_hotel=server.createobject("adodb.recordset")
sql1="select * from Allhotel where index='1' order by id desc"
rs_hotel.open sql1,conn,1,1 '这里是第30行
%>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td width="7%" height="8"></td>
<td width="93%"></td>
</tr>
<%i=0
do while not rs_hotel.eof%>
<tr align="center">
<td><img src="Images/article_common.gif" width="9" height="15" />
</td>
<td style='BORDER-bottom: #999999 1px dotted'> <div align="left">
<p style='line-height:150%'><a href="Product.asp?id=<%=rs_hotel("id")%>" target="_blank">
<%=rs_hotel("Title")%></a><br>
</div></td>
</tr>
<%rs_hotel.movenext
i=i+1
loop
rs_Product.close %>
<tr>
<td height="8"></td>
<td></td>
</tr>
</table>
这里是config.asp的代码……
<%
dim conn,db
dim connstr
db="data/data.mdb" '数据库文件位置
'on error resume next
connstr="DBQ="+server.mappath(""&db&"")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=server.createobject("ADODB.CONNECTION")
if err then
err.clear
else
conn.open connstr
end if
sub CloseConn()
conn.close
set conn=nothing
end sub
%>
请高人们指点一下……