数据库连接出错,请检查连接字串。未找到提供程序。该程序可能未正确安装。
论坛一上传到服务器上就出现“数据库连接出错,请检查连接字串。未找到提供程序。该程序可能未正确安装。”很多办法都试了就是不行。急死人啊,能帮下吗?下面是conn。asp文件...
论坛一上传到服务器上就出现“数据库连接出错,请检查连接字串。未找到提供程序。该程序可能未正确安装。”
很多办法都试了就是不行。急死人啊,能帮下吗?
下面是conn。asp文件的内容。求救。。。
<%@ LANGUAGE = VBScript CodePage = 936%>
<%
Response.Buffer=True
IsSqlDataBase=0
If IsSqlDataBase=0 Then
Db = "database/xylybbs.mdb"
Connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath(db)
SqlNowString="Now()"
SqlChar="'"
Else
SqlLocalName ="(local)"
SqlUserName ="sa"
SqlPassword ="1"
SqlDatabaseName="bbsxp"
ConnStr = "Provider=Sqloledb;User ID=" & SqlUserName & "; Password=" & SqlPassword & "; Initial CataLog = " & SqlDatabaseName & "; Data Source=" & SqlLocalName & ";"
SqlNowString="GetDate()"
IsSqlVer="SQL"
END IF
ForumsVersion="6.00 "&IsSqlVer&""
On Error Resume Next
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.open ConnStr
If Err Then
err.Clear
Set Conn = Nothing
Response.Write "数据库连接出错,请检查连接字串。"
Response.End
End If
On Error GoTo 0
Function ReplaceText(fString,patrn,replStr)
Set regEx = New RegExp
regEx.Pattern = patrn
regEx.IgnoreCase = True
regEx.Global = True
ReplaceText = regEx.Replace(""&fString&"",""&replStr&"")
Set reg=nothing
End Function
sub CloseDatabase
Conn.Close
set Rs=nothing
set Rs1=nothing
set Conn=nothing
set SiteSettings=nothing
Response.End
end sub
%>
肯定是有数据库文件的. 展开
很多办法都试了就是不行。急死人啊,能帮下吗?
下面是conn。asp文件的内容。求救。。。
<%@ LANGUAGE = VBScript CodePage = 936%>
<%
Response.Buffer=True
IsSqlDataBase=0
If IsSqlDataBase=0 Then
Db = "database/xylybbs.mdb"
Connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath(db)
SqlNowString="Now()"
SqlChar="'"
Else
SqlLocalName ="(local)"
SqlUserName ="sa"
SqlPassword ="1"
SqlDatabaseName="bbsxp"
ConnStr = "Provider=Sqloledb;User ID=" & SqlUserName & "; Password=" & SqlPassword & "; Initial CataLog = " & SqlDatabaseName & "; Data Source=" & SqlLocalName & ";"
SqlNowString="GetDate()"
IsSqlVer="SQL"
END IF
ForumsVersion="6.00 "&IsSqlVer&""
On Error Resume Next
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.open ConnStr
If Err Then
err.Clear
Set Conn = Nothing
Response.Write "数据库连接出错,请检查连接字串。"
Response.End
End If
On Error GoTo 0
Function ReplaceText(fString,patrn,replStr)
Set regEx = New RegExp
regEx.Pattern = patrn
regEx.IgnoreCase = True
regEx.Global = True
ReplaceText = regEx.Replace(""&fString&"",""&replStr&"")
Set reg=nothing
End Function
sub CloseDatabase
Conn.Close
set Rs=nothing
set Rs1=nothing
set Conn=nothing
set SiteSettings=nothing
Response.End
end sub
%>
肯定是有数据库文件的. 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询