asp+access网站本地测试通过,传到服务器上显示数据库连接错误
<%@LANGUAGE ="VBScript.Encode" CODEPAGE="936"%>
<!--#include file="Config.asp"-->
<!--#include file="Function.asp"-->
<%
Response.Addheader "Content-Type","text/html; charset=gb2312"
dim conn,connstr,Data
if SqlNo =1 then
On error resume next
Set Conn=Server.CreateObject("Adodb.Connection")
ConnStr="PROVIDER=SQLOLEDB;DATA SOURCE=3325A06D8;UID=sa;PWD=;DATABASE=ZhiRui"
Conn.open ConnStr
else
Data="DataBase/"&DataName&""
on error resume next
Set conn = Server.CreateObject("ADODB.Connection")
connstr="dbq="+server.mappath(Data)+";defaultdir=;driver={microsoft access driver (*.mdb)};uid=;password="&Uidv&";"
conn.Open connstr
Connlock
end if
If Err Then
err.Clear
Set Conn = Nothing
Response.Write "<div style='margin:100px;font-size:14px;text-align:center'>数据库连接出错,请检查数据库名称及路径是否正确。</div>"
Response.End
End If
FunConn
if power=1 then
if Jump=0 then
Response.write"<div align=center><br>对不起,网站正在维护中.请稍候……<br></div>"
Response.end
else
Call Alert ("页面正在跳转中……",""&pages&"")
end if
end if
%>
<!--#include file="lockyou.asp"-->
其中SqlNo =0,数据库名称没错,求各位高手帮忙!