ADO connects user-level encrypted Access database __ Database

Source: Internet
Author: User
Tags mdb database access database

Recently do a project need to connect to a 3rd party software to use the MDB database, the MDB file is user-level encryption, although the partner gave the user name, said no password, but can not be queried with ADO, reported no permissions. You can't see the data in the table as you open it with access. So to search the Internet, the results only found how to use access to encrypt MDB and open encrypted files, this is not related to programming, did not look. About ADO connection encryption MDB, but only how to connect the MDB that set the password, is the default administrator login, there is no way to change the user logon instructions, and user-level encryption of the MDB generally do not give the administrator any permissions. This has to find out for themselves, the problem must be on the connection string, and then try to modify. The generic connection MDB string is in the following format:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=dest.mdb; Persist Security Info=true

The connection set the password MDB, is plus the Jet oledb:database Password=password, but the user-level encryption MDB has not set the password, but has changed the user, simultaneously does not give the administrator any permission, needs to change the user to log in, and then adds users id= Username; Error: Unable to start the application. The workgroup information file is missing or has been opened exclusively by another user. Changed several times not, had to carefully read the online article, know that must have the corresponding MDW file, ask the partner to the MDW file, press the method of online access to open the database, but how to add mdw connection string, but a little clue did not. Bored in the program to open the system's data link properties, in the property page "All" See this attribute: Jet Oledb:system database, the eye is bright, is this. Try it, and sure enough the connection is successful and can be queried. 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

More careful study, found that if you do not ask the partner to this mdw, there is a way, there is a tool can see the MDB file password and user information, in Access by the user name and ID to create a new user, and then copy their own MDW files to add to the connection string, The same can be connected and query, MDB security is still relatively fragile ah.

As the saying goes, the money to suppress the hero Han, in it is often a word to suppress the programmer, do not know the real dead there, to this memo. Reprint please indicate the source.

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.