ACCESS数据库设置密码123456,要怎么修改连接?
ACCESS数据库设置了一个123456的密码后,数据库连接语句要怎么修改,请高手指教.谢谢!未设密码前的数据库连接代码如下:<!--#includefile="dbco...
ACCESS数据库设置了一个123456的密码后,数据库连接语句要怎么修改,请高手指教.谢谢!
未设密码前的数据库连接代码如下:
<!--#include file="dbconn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
set conn=server.createobject("adodb.connection")
mypath=server.mappath("../"+dbname)
conn.open "driver={microsoft access driver (*.mdb)};dbq="&mypath&""
''论坛用函数
function connClose
Conn.close
Set conn = Nothing
End Function
function errmsg(message)
session("err")=message
response.redirect"../gbook/err.asp"
End Function
''通迅录用连接
function dbconn(sessionname)
dim conn
Set conn=Server.CreateObject("ADODB.Connection")
conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("../"+dbname)
set session(sessionname)=conn
set dbconn=session(sessionname)
end function
''文件共享用
connstr = "Provider=Microsoft.Jet.Oledb.4.0;data source="&Server.MapPath("../"+dbname)
set myconn = Server.CreateObject("adodb.connection")
myconn.open connstr
''邮件用
set conn1=server.createobject("adodb.connection")
mypath=server.mappath("../"+dbname)
conn1.open "driver={microsoft access driver (*.mdb)};dbq="&mypath
''备份用
DataName = "../"+dbname
SelectDataType = "Access"
%> 展开
未设密码前的数据库连接代码如下:
<!--#include file="dbconn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
set conn=server.createobject("adodb.connection")
mypath=server.mappath("../"+dbname)
conn.open "driver={microsoft access driver (*.mdb)};dbq="&mypath&""
''论坛用函数
function connClose
Conn.close
Set conn = Nothing
End Function
function errmsg(message)
session("err")=message
response.redirect"../gbook/err.asp"
End Function
''通迅录用连接
function dbconn(sessionname)
dim conn
Set conn=Server.CreateObject("ADODB.Connection")
conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("../"+dbname)
set session(sessionname)=conn
set dbconn=session(sessionname)
end function
''文件共享用
connstr = "Provider=Microsoft.Jet.Oledb.4.0;data source="&Server.MapPath("../"+dbname)
set myconn = Server.CreateObject("adodb.connection")
myconn.open connstr
''邮件用
set conn1=server.createobject("adodb.connection")
mypath=server.mappath("../"+dbname)
conn1.open "driver={microsoft access driver (*.mdb)};dbq="&mypath
''备份用
DataName = "../"+dbname
SelectDataType = "Access"
%> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |