标题:传到空间数据库连接出错,本地测试正常。不知道什么地方错误,求解
取消只看楼主
QQ80858582
Rank: 1
等 级:新手上路
帖 子:13
专家分:2
注 册:2010-4-14
结帖率:50%
已结贴  问题点数:10 回复次数:1 
传到空间数据库连接出错,本地测试正常。不知道什么地方错误,求解
<%
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数据库,哪位高手能帮忙解答一下?谢谢了哈
搜索更多相关主题的帖子: 空间 数据库 求解 
2010-04-26 10:17
QQ80858582
Rank: 1
等 级:新手上路
帖 子:13
专家分:2
注 册:2010-4-14
得分:0 
还是不行。
2010-04-26 13:12



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-304415-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.211776 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved