ADO connection to user-level encrypted access database

Source: Internet
Author: User
Tags mdb database

Recently, a project needs to connect to an mdb database used by the 3rd-party software. The MDB file is user-level encryption. Although the partner has given the user name and said there is no password, it cannot be queried using ADO, report No permission. The same is true when using access. You cannot view the data in the table. So I went to the Internet to search and found only how to use access to encrypt MDB and open encrypted files. This has nothing to do with programming and I will not go into detail. The default Administrator Logon method is used for connecting to the MDB encrypted by ADO, but only the MDB with the password set, user-level encryption MDB generally does not give the Administrator any permissions. Now I had to find out for myself. The problem must be the connection string, so I tried to modify it. The following format is used to connect MDB strings:

 

Provider = Microsoft. Jet. oledb.4.0; Data Source = DeST. mdb; persist Security info = true

 

The MDB with the password set is connected with jet oledb: Database Password = password, but the user-level encryption MDB does not set the password, but it is changed to a user, at the same time, the Administrator is not given any permissions, and the user ID = username; is added, but the error is: the application cannot be started. The workgroup information file is lost or exclusive to other users. I had to read the online article carefully and know that there must be a corresponding MDW file. I asked the partner to access the MDW file and open the database using access on the Internet, but there is no clue about how to add MDW to the connection string. It's boring to open the data link attribute of the system in the program. In the "all" attribute page, we can see this attribute: jet oledb: System database. The eyes are bright. Isn't that what it is? After a try, the connection was successful and the query was completed! The connection string is as follows:

 

Provider = Microsoft. Jet. oledb.4.0; user id = username; Data Source = DeST. mdb; persist Security info = true; Jet oledb: System database = xxx. MDW

 

After careful research, I found that there is a way to ask the partner for this MDW. tools can be used to view the password and user information of the MDB file, in access, create a user based on the user name and ID you see, and copy your MDW file to the connection string. You can also connect and query it. The MDB security is weak after all.

 

As the saying goes, a money throws a hero. In it, a programmer is often killed. If you don't know it, you will actually die there. Indicate the source for reprinting.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.