|
主题:[求助]KesionCMS V6.5 SP4 Free 的安装问题 [收藏主题] |
安装环境:
windows 2003 ip:192.168.0.110 sql server 2000 sp4 登陆的时候显示:数据库连接出错,请检查Conn.asp文件中的数据库参数设置。 设置如下: <% Response.CodePage=65001 Response.Charset="utf-8" Dim SqlNowString,DataPart_D,DataPart_Y,DataPart_H,DataPart_S Dim Conn,DBPath,CollectDBPath,DataServer,DataUser,DataBaseName,DataBasePsw,ConnStr,CollcetConnStr Const DataBaseType=1 '系统数据库类型,"1"为MS SQL2000数据库,"0"为MS ACCESS 2000数据库 Const MsxmlVersion=".3.0" '系统采用XML版本设置 Const EnableSiteManageCode = True '是否启用后台管理认证码 是: True 否: False Const SiteManageCode = "8888" '后台管理认证码,请修改,这样即使有人知道了您的后台用户名和密码也不能登录后台 If DataBaseType=0 then '如果是ACCESS数据库,请认真修改好下面的数据库的文件名 DBPath = "/KS_Data/KesionCMS6.mdb" 'ACCESS数据库的文件名,请使用相对于网站根目录的的绝对路径 Else '如果是SQL数据库,请认真修改好以下数据库选项 DataServer = "192.168.0.110" '数据库服务器IP DataUser = "sa" '访问数据库用户名 DataBaseName = "KesionCMS6" '数据库名称 DataBasePsw = "sa" '访问数据库密码 End if '采集数据库路径 CollectDBPath="\KS_Data\Collect\KS_Collect.Mdb" '=============================================================== 以下代码请不要自行修改======================================== Call OpenConn Sub OpenConn() On Error Resume Next If DataBaseType = 1 Then ConnStr="Provider = Sqloledb; User ID = " & datauser & "; Password = " & databasepsw & "; Initial Catalog = " & databasename & "; Data Source = " & dataserver & ";" SqlNowString = "getdate()" DataPart_D = "d" DataPart_Y = "y" DataPart_H = "hour" DataPart_S = "s" Else ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(DBPath) SqlNowString = "Now()" DataPart_D = "'d'" DataPart_Y = "'yyyy'" DataPart_H = "'h'" DataPart_S = "'s'" End If Set conn = Server.CreateObject("ADODB.Connection") conn.open ConnStr If Err Then Err.Clear:Set conn = Nothing:Response.Write "数据库连接出错,请检查Conn.asp文件中的数据库参数设置。":Response.End CollcetConnStr ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(CollectDBPath) End Sub Sub CloseConn() On Error Resume Next Conn.close:Set Conn=nothing End sub '==============================================全局临时变量类开始============================== Dim GCls:Set GCls=New GlobalVarCls Class GlobalVarCls Public StaticPreList,StaticPreContent,StaticExtension Private Sub Class_Initialize() StaticPreList = "list" rem 伪静态列表前缀 不能包含"?"及"-" staticPreContent = "thread" rem 伪静态内容前缀 StaticExtension = ".html" rem 伪静态扩展名 End Sub Private Sub Class_Terminate() Set GCls=Nothing End Sub Public Function Execute(Command) If Not IsObject(Conn) Then OpenConn() On Error Resume Next Set Execute = Conn.Execute(Command) If Err Then Response.Write("查询语句为:" & Command & "<br>") Response.Write("错误信息为:" & Err.Description & "<br>") Err.Clear Set Execute = Nothing Response.End() End If 'Sql_Use = Sql_Use + 1 End Function Function GetUrl() On Error Resume Next Dim strTemp If LCase(Request.ServerVariables("HTTPS")) = "off" Then strTemp = "http://" Else strTemp = "https://" End If strTemp = strTemp & Request.ServerVariables("SERVER_NAME") If Request.ServerVariables("SERVER_PORT") <> 80 Then strTemp = strTemp & ":" & Request.ServerVariables("SERVER_PORT") end if strTemp = strTemp & Request.ServerVariables("URL") If Trim(Request.QueryString) <> "" Then strTemp = strTemp & "?" & Trim(Request.QueryString) end if GetUrl = strTemp End Function '====================标志来访地址================ Public Property Let ComeUrl(ByVal strVar) Session("M_ComeUrl") = strVar End Property Public Property Get ComeUrl ComeUrl= Session("M_ComeUrl") End Property '================================================ End Class '==============================================全局临时变量类结束============================== %> 请高手告诉一下问题出在哪里,万分感谢!! |
|
支持(0) | 反对(0) 顶端 底部 |
支持(0) | 反对(0) 顶端 底部 |
<上一主题 | 下一主题 > |