传到空间数据库连接出错,本地测试正常。不知道什么地方错误,求解
<%On Error Resume Next
Dim Startime
Dim SqlNowString
Dim Conn,Db,MyDbPath,IsSqlDataBase
'========================定义数据库类别,1为SQL数据库,0为Access数据库=============================
IsSqlDataBase = "0"
MyDbPath = ""
if IsSqlDataBase = 1 Then
SqlNowString = "GetDate()"
Else
'========================Access数据库设置==========================================================
Db = "/datas/#bsbst.mdb"
SqlNowString = "Now()"
End If
Dim ConnStr
If IsSqlDataBase = 1 Then
ConnStr = "Provider = Sqloledb; User ID =sa; Password =opq33music; Initial Catalog =DJSOMD; Data Source =localhost;"
Else
ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(MyDbPath & db)
End If
Set conn = Server.CreateObject("ADODB.Connection")
conn.open ConnStr
If Err Then
err.Clear
Set Conn = Nothing
Response.Write "数据连接出错,请检查数据连接!"
Response.End
End If
'----------------------------------- SEO程序 ------------------------------
Sugagent = Request.servervariables("http_user_agent")
Sugagent = Lcase(Trim(Sugagent))
If Instr(Sugagent,"baidu")>0 Then wwwseo = 1
If Instr(Sugagent,"google")>0 Then wwwseo = 1
If Instr(Sugagent,"alexa")>0 Then wwwseo = 1
If Instr(Sugagent,"yahoo")>0 Then wwwseo = 1
If Instr(Sugagent,"sohu")>0 Then wwwseo = 1
If Instr(Sugagent,"msn")>0 Then wwwseo = 1
If Instr(Sugagent,"sogou")>0 Then wwwseo = 1
If Instr(Sugagent,"3721")>0 Then wwwseo = 1
If Instr(Sugagent,"youdao")>0 Then wwwseo = 1
If Instr(Sugagent,"zhongguosou")>0 Then wwwseo = 1
If Instr(Sugagent,"live")>0 Then wwwseo = 1
'----------------------------------- SEO程序 ------------------------------
%>
我用的是ACC数据库,哪位高手能帮忙解答一下?谢谢了哈