下载的网站模版,在本机测试没问题,上传到服务器,登陆后台时显示 用户数据库连接出错,请检查连接字串。
附代码conn.aspDimDataPath,Conn,Connstr,ArrshowLine(10)DimKe,Re,Template,SqlNowString,MyU...
附代码conn.asp
Dim DataPath,Conn,Connstr,ArrshowLine(10)
Dim Ke,Re,Template,SqlNowString,MyUserOnline,Restr,Ka
Dim Title,ErrMsg,info
Set Re = New RegExp
Set Ke = New Cls_Ke
Set Ka=New ArticleClass
Set re = New RegExp
If IsSqlDataBase = 1 Then
SqlNowString = "GetDate()"
Else
SqlNowString = "Now()"
End If
'网站数据库连接
Sub Connect()
Set conn=server.createobject("ADODB.connection")
If IsSqlDataBase = 1 Then
Connstr="PROVIDER=SQLOLEDB;DATA SOURCE=127.0.0.1;UID=sa;PWD=123456;DATABASE=cncmr"
Else
Connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(DataPath)
End IF
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
End Sub
%>
哪位高手告诉我怎么弄呀,加QQ,感激不进呀~!~!~!~!~!~!~!~!· 展开
Dim DataPath,Conn,Connstr,ArrshowLine(10)
Dim Ke,Re,Template,SqlNowString,MyUserOnline,Restr,Ka
Dim Title,ErrMsg,info
Set Re = New RegExp
Set Ke = New Cls_Ke
Set Ka=New ArticleClass
Set re = New RegExp
If IsSqlDataBase = 1 Then
SqlNowString = "GetDate()"
Else
SqlNowString = "Now()"
End If
'网站数据库连接
Sub Connect()
Set conn=server.createobject("ADODB.connection")
If IsSqlDataBase = 1 Then
Connstr="PROVIDER=SQLOLEDB;DATA SOURCE=127.0.0.1;UID=sa;PWD=123456;DATABASE=cncmr"
Else
Connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(DataPath)
End IF
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
End Sub
%>
哪位高手告诉我怎么弄呀,加QQ,感激不进呀~!~!~!~!~!~!~!~!· 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询