设为首页收藏本站

新微赢技术网

 找回密码
 注册
搜索
热搜: 回贴
查看: 58|回复: 1
打印 上一主题 下一主题

看看,数据库连接错哪里了

[复制链接]
跳转到指定楼层
1#
发表于 2010-1-10 03:19:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
<%
Call FixedCacheName(1)
Set iXs = New iXuEr_CMSCore
Set Templates = New iXuEr_CMSSkins
If Not IsArray(iXs.UpLoad_Setting) Then Call iXs.LoadSetup("UpLoad")
Dim SqlConn, SqlConnStr
Dim DefaultDatabaseSettings, DefaultDatabaseSetting

' ----------------------------------------------------------------------------------------
If Request.ServerVariables("LOCAL_ADDR") = "221.7.12.165" Then
    DefaultDatabaseSetting = "221.7.12.165,26166|sqlixuercms_bak|longyuecmusic|losnwgwydxewguecmudssic"
Else
    DefaultDatabaseSetting = "(local)|sqlixuercms_bak|longyuecmusic|losnwgwydxewguecmudssic"
End If

If Not IsArray(DefaultDatabaseSettings) Then DefaultDatabaseSettings = Split(DefaultDatabaseSetting, "|")
SqlConnStr = "Provider = Sqloledb; User ID = " & DefaultDatabaseSettings(2) & "; Password = " & DefaultDatabaseSettings(3) & "; Initial Catalog = " & DefaultDatabaseSettings(1) & "; Data Source = " & DefaultDatabaseSettings(0) & ";"
Set SqlConn = Server.CreateObject(ServerObject_001)
SqlConn.Open SqlConnStr

' ----------------------------------------------------------------------------------------
' 上传系统参数设置
' ----------------------------------------------------------------------------------------
Dim UpLoadSetting, ForChannel
iXs.ReqMode = 3
ForChannel = iXs.ReqNum("ChannelID", 0)
iXs.ReqMode = 0
UpLoadSetting = Split(iXs.UpLoad_Setting(20), "$$$") ' 上传系统配置信息
If ForChannel > UBound(UpLoadSetting) Then ForChannel = 0
Temp = UpLoadSetting(ForChannel)
UpLoadSetting = Split(Temp, "@@@") ' 频道上传配置
' --------------------------------------------------------------------------------------------
' 预留的频道参数,上传系统可以被改造成其他的应用程序
iXs.ChannelID = 8 ' 频道编号
iXs.ChannelName = "上传管理" ' 频道名称
iXs.ChannelKey = "文件上传"
%>
总是说数据库连接错误
帮我看看哪里错了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

申请友链|小黑屋|最新主题|手机版|新微赢技术网 ( 苏ICP备08020429号 )  

GMT+8, 2024-11-18 05:21 , Processed in 0.084673 second(s), 9 queries , Gzip On, Memcache On.

Powered by xuexi

© 2001-2013 HaiAn.Com.Cn Inc. 寰耽

快速回复 返回顶部 返回列表