我在IIS5.1下面不能打开,说第8行有错,就是数据库连接有问题,而在我们空间服务器上却能运行,麻烦帮忙看看应该怎么改才可以在IIS5.1上面运行呀?
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<% dim conn,rs
set conn= Server.CreateObject("adodb.connection")
conn.open "driver=microsoft access driver (*.mdb);dbq="&server.MapPath("database/#Zjs15dlq27xHsdfas980sdfas7u.mdb")
set rs=Server.CreateObject("adodb.recordset")
%>
<html><% sql="update sets set num=num+1"
conn.execute(sql)
sql="select * from sets"
rs.open sql,conn,1,1
if not rs.eof then %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%= rs("names") %></title>
<link href="img/css.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#1066B4" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="css1">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="1" colspan="6" bgcolor="#333333"> </td>
</tr>
<tr>
<td width="74%" height="23" background="img/index/syxm1.gif"> </td>
<td width="1%" background="img/index/syxm1.gif"><div align="center"></div></td>
<td width="5%" background="img/index/syxm1.gif"> </td>
<td width="1%" background="img/index/syxm1.gif"><div align="center"></div></td>
<td width="5%" background="img/index/syxm1.gif"> </td>
<td width="14%" background="img/index/syxm1.gif"><div align="right"><a href="behind/login.asp" target="_blank"><img src="img/index/di.gif" width="8" height="8" border="0"></a></div></td>
</tr>
<tr>
<td height="1" colspan="6" bgcolor="#333333"> </td>
</tr>
</table></td>
</tr>
<tr>
參考答案:这样写试一下.不要用虚拟目录建立网站..要在要目录建站点..
还有你把错误贴出来.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<% dim conn,rs
set conn= Server.CreateObject("adodb.connection")
conn.open "driver=microsoft access driver (*.mdb);dbq="&server.MapPath("/database/#Zjs15dlq27xHsdfas980sdfas7u.mdb")
set rs=Server.CreateObject("adodb.recordset")
%>
<html>
<% sql="update sets set num=num+1"
conn.execute(sql)
sql="select * from sets"
rs.open sql,conn,1,3
if not rs.eof then %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%= rs("names") %></title>
<link href="img/css.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#1066B4" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="css1">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="1" colspan="6" bgcolor="#333333"> </td>
</tr>
<tr>
<td width="74%" height="23" background="img/index/syxm1.gif"> </td>
<td width="1%" background="img/index/syxm1.gif"><div align="center"></div></td>
<td width="5%" background="img/index/syxm1.gif"> </td>
<td width="1%" background="img/index/syxm1.gif"><div align="center"></div></td>
<td width="5%" background="img/index/syxm1.gif"> </td>
<td width="14%" background="img/index/syxm1.gif"><div align="right"><a href="behind/login.asp" target="_blank"><img src="img/index/di.gif" width="8" height="8" border="0"></a></div></td>
</tr>
<tr>
<td height="1" colspan="6" bgcolor="#333333"> </td>
</tr>
</table></td>
</tr>
<tr>