VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Open A Password Protected MDB By Using ADO

by Amit Upadhyay (4 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 8th August 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

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




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


Download this snippet    Add to My Saved Code

Open A Password Protected MDB By Using ADO Comments

No comments have been posted about Open A Password Protected MDB By Using ADO. Why not be the first to post a comment about Open A Password Protected MDB By Using ADO.

Post your comment

Subject:
Message:
0/1000 characters