<body leftmargin="0" topmargin="0">
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td colspan="2"><!--#include file="New/Top.asp" --></td>
</tr>
<tr>
<td width="220" valign="top"><!--#include file="New/Left.asp" --></td>
<td width="540" valign="top" bgcolor="#FFFFFF" class="Td-1">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%Set Rs=Conn.Execute("Select * from [reColumn] Where id="&Trim(Request.QueryString("id")))%>
<tr>
<td height="30" align="center" background="New/Img/columnTitle.gif"><strong><font color="#FFFFFF">
<%=Rs("Title")%></font></strong></td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="15">
<tr>
<td><%=Rs("Message")%></td>
</tr>
</table></td>
</tr>
<%Set Rs=Nothing%>
<tr>
<td align="center">
<table width="90%" border="0" cellspacing="0" cellpadding="3">
<%
Set Rs=Conn.Execute("Select * From reColumn Where fID="&Trim(Request.QueryString("id")))
Do While Not Rs.Eof
Set Rs1=Conn.Execute("Select * From reProgram Where cID="&Rs("ID"))
Do While Not Rs1.Eof
%>
<tr>
<td>[<%=Rs("Title")%>]<a href="New/reProgram.asp?id=<%=Rs1("ID")%>"><%=Rs1("Title")%></a></td>
</tr>
<%
Rs1.moveNext
Loop
Set Rs1=Nothing
Rs.moveNext
Loop
Set Rs=Nothing
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2"><!--#include file="New/Bottom.asp"--></td>
</tr>
</table>
</body>
</html>
以上是我的原程序
运行也没错误
现在我要把<!--#include file="New/Top.asp" -->
改为<!--#include file="include/Top.asp" -->
而inculde/top.asp是调用的data下的数据库
连接这个数据库的inculde/conn.asp
<%
dim stime,typess
stime=timer()
typess=1
dim conn
dim connst
on error resume next
connst="DBQ="+server.mappath("data/!#%&@$^.asp")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connst
if session("cffilmuser")="" then
if Request.cookies("gl")("cffilmuser")<>"" then
cffilmuser=Request.cookies("gl")("cffilmuser")
session("cffilmuser")=cffilmuser
end if
if Request.cookies("gl")("cffilmusergrade")<>"" then
cffilmusergrade=Request.cookies("gl")("cffilmusergrade")
session("cffilmusergrade")=cffilmusergrade
end if
name=session("cffilmuser")
else
name=session("cffilmuser")
end if
if session("cffilmadmin")="" then
if Request.cookies("cffilmadmin")<>"" then
cffilmadmin=Request.cookies("cffilmadmin")
session("cffilmadmin")=cffilmadmin
end if
end if
Connstr="DBQ="+server.mappath("./MyDataBase/#My#Data#Base#.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
Conn1.open ConnStr作者: 简单快乐 时间: 2010-1-13 07:29
现在我把include/conn.asp写成
<%
dim stime,typess
stime=timer()
typess=1
dim conn
dim connst
on error resume next
connstr="DBQ="+server.mappath("data/!#%&@$^.asp")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
connstr="DBQ="+server.mappath("./MyDataBase/#My#Data#Base#.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn1=server.createobject("ADODB.CONNECTION")
conn1.open connstr
if session("cffilmuser")="" then
if Request.cookies("gl")("cffilmuser")<>"" then
cffilmuser=Request.cookies("gl")("cffilmuser")
session("cffilmuser")=cffilmuser
end if
if Request.cookies("gl")("cffilmusergrade")<>"" then
cffilmusergrade=Request.cookies("gl")("cffilmusergrade")
session("cffilmusergrade")=cffilmusergrade
end if
name=session("cffilmuser")
else
name=session("cffilmuser")
end if
if session("cffilmadmin")="" then
if Request.cookies("cffilmadmin")<>"" then
cffilmadmin=Request.cookies("cffilmadmin")
session("cffilmadmin")=cffilmadmin
end if
end if
webtitle="东山广播电视网"
%>
就是把connstr="DBQ="+server.mappath("./MyDataBase/#My#Data#Base#.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn1=server.createobject("ADODB.CONNECTION")
conn1.open connstr
加进去了
然后把<!--#include file="New/Top.asp" -->改为
<!--#include file="include/Top.asp" -->作者: 成熟之惑 时间: 2010-1-13 07:30
运行出现该页无法显示啊作者: 林枫 时间: 2010-1-13 07:30
你看看错误信息作者: 爱随缘 时间: 2010-1-13 07:30 作者: 一网情深 时间: 2010-1-13 07:30
<%
dim stime,typess
stime=timer()
typess=1
dim conn ,conn1
dim connst,connstr
on error resume next
connst="DBQ="+server.mappath("data/!#%&@$^.asp")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connst
connstr="DBQ="+server.mappath("./MyDataBase/#My#Data#Base#.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn1=server.createobject("ADODB.CONNECTION")
conn1.open connstr作者: 亾莣乁靈柩 时间: 2010-1-13 07:30
错误信息是什么