最新下载
热门教程
- 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
相关文章
- 《无限暖暖》天星之羽获得位置介绍 12-20
- 《流放之路2》重铸台解锁方法介绍 12-20
- 《无限暖暖》瞄准那个亮亮的成就怎么做 12-20
- 《无限暖暖》魔气怪终结者完成方法 12-20
- 《无限暖暖》曙光毛团获得位置介绍 12-20
- 《无限暖暖》日光果获得位置介绍 12-20