2个回答
展开全部
access 的
Set Conn=Server.CreateObject("ADODB.Connection")
strConn = "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("./db/ipdb.mdb")
Conn.Open strconn
SQLSERVER 的
dim UserID,pwd,db,host
userID = "sa" '填写MSSQLserver的用户名
pwd = "1234566" '与MSSQLserver的用户对应的密码
db = "zxxxx" '所采用的数据库名
host = "127.0.0.1" 'MSSQLserver的主机名
Set Conn=Server.CreateObject("ADODB.Connection")
strConn = "Provider = SQLOLEDB.1; User ID = "& userID &"; Password ="&pwd&";" &_
"Initial Catalog ="& db &"; Data Source ="&host
Conn.Open strconn
Set Conn=Server.CreateObject("ADODB.Connection")
strConn = "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("./db/ipdb.mdb")
Conn.Open strconn
SQLSERVER 的
dim UserID,pwd,db,host
userID = "sa" '填写MSSQLserver的用户名
pwd = "1234566" '与MSSQLserver的用户对应的密码
db = "zxxxx" '所采用的数据库名
host = "127.0.0.1" 'MSSQLserver的主机名
Set Conn=Server.CreateObject("ADODB.Connection")
strConn = "Provider = SQLOLEDB.1; User ID = "& userID &"; Password ="&pwd&";" &_
"Initial Catalog ="& db &"; Data Source ="&host
Conn.Open strconn
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询