| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 688 人关注过本帖
标题:看看,数据库连接错哪里了
只看楼主 加入收藏
lili0610931
Rank: 1
等 级:新手上路
帖 子:133
专家分:0
注 册:2007-7-6
收藏
 问题点数:0 回复次数:0 
看看,数据库连接错哪里了
<%
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 = "文件上传"
%>
总是说数据库连接错误
帮我看看哪里错了
搜索更多相关主题的帖子: 数据库 quot Set iXs New 
2008-05-27 10:35
快速回复:看看,数据库连接错哪里了
数据加载中...
 
   



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

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