最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
通过MS SQL 数据库SA帐号增加新用户至administrators组
时间:2022-06-30 10:48:26 编辑:袖梨 来源:一聚教程网
<%
'----数据库连接Start
'---二级域名名称
Main_Domain="web" '--域名格式为pcc.net
dim conn_Home
dim conn_Homestr
'定义数据库类别,1为SQL数据库,0为Access数据库
const IsSqlDataBase_Homestr = 1
call conn_Home_init()
sub conn_Home_init()
if IsSqlDataBase_Homestr = 1 then
' 注此sql登陆需要有sa帐号和xp_cmdshell存储过程
'sql数据库连接参数:数据库名、用户密码、用户名、连接名(本地用local,外地用IP)
Dim SqlDatabaseName,SqlPassword,SqlUsername,SqlLocalName
SqlDatabaseName = "Master"
SqlPassword = "1"
SqlUsername = "sa"
SqlLocalName = "127.0.0.1"
conn_HomeStr = "Provider = Sqloledb; User ID = " & SqlUsername & "; Password = " & SqlPassword & "; Initial Catalog = " & SqlDatabaseName & "; Data Source = " & SqlLocalName & ";"
else
DB = "/User_Database/DataBase/Shop_Manager.MDB" '---数据库路径
conn_HomeStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(db)
end if
Set conn_Home = Server.CreateObject("ADODB.Connection")
on error resume next
if err.number<>0 then
err.clear
set conn_Home=nothing
Response.write "管理数据库连接出错!"
Response.End
else
'----数据库连接Start
'---二级域名名称
Main_Domain="web" '--域名格式为pcc.net
dim conn_Home
dim conn_Homestr
'定义数据库类别,1为SQL数据库,0为Access数据库
const IsSqlDataBase_Homestr = 1
call conn_Home_init()
sub conn_Home_init()
if IsSqlDataBase_Homestr = 1 then
' 注此sql登陆需要有sa帐号和xp_cmdshell存储过程
'sql数据库连接参数:数据库名、用户密码、用户名、连接名(本地用local,外地用IP)
Dim SqlDatabaseName,SqlPassword,SqlUsername,SqlLocalName
SqlDatabaseName = "Master"
SqlPassword = "1"
SqlUsername = "sa"
SqlLocalName = "127.0.0.1"
conn_HomeStr = "Provider = Sqloledb; User ID = " & SqlUsername & "; Password = " & SqlPassword & "; Initial Catalog = " & SqlDatabaseName & "; Data Source = " & SqlLocalName & ";"
else
DB = "/User_Database/DataBase/Shop_Manager.MDB" '---数据库路径
conn_HomeStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(db)
end if
Set conn_Home = Server.CreateObject("ADODB.Connection")
on error resume next
if err.number<>0 then
err.clear
set conn_Home=nothing
Response.write "管理数据库连接出错!"
Response.End
else
相关文章
- 人们熟悉的寄居蟹属于以下哪种分类 神奇海洋11月21日答案 11-21
- 第五人格11.22共研服有什么更新 11月22日共研服更新内容介绍 11-21
- 原神恰斯卡怎么培养 11-21
- 无期迷途四星装束是谁 11-21
- 王者荣耀帝丹高中校服怎么获得 11-21
- 光遇姆明季后续版本怎么玩 11-21