Open A Password Protected MDB By Using ADO
Open A Password Protected MDB By Using ADO
API Declarations
Dim cmd as Adodb.command
dim rs as recordset
dim con as connection
Rate Open A Password Protected MDB By Using ADO
(1(1 Vote))
set cmd =new adodb.command
set rs = new adodb.recordset
set con=new adodb.connection
put adodc control in your form
and right click on the control and click properties
and then click build select jet oledb 3.51 or 4.0 Acess driver
select the path of the mdb and enter the password in the next dialog box with the user name as admin and then select apply. An error will occur dont worry
copy the connection string
con.open " paste the connection string ;jet oledb:database password=whatever password you have given write in the string ;"
con.cursorlocation=aduseclient
cmd.activeconnection=con
cmd.commandtext="SELECT * FROM tablename"
set rs=cmd.execute
if rs.eof=false then
msgbox("Database and Table Opened Sucessfully")
endif
Open A Password Protected MDB By Using ADO Comments
No comments yet — be the first to post one!
Post a Comment