ODBC access to the ACCESS database with a password

Source: Internet
Author: User

Method 1: Unlock when creating a data source:

You can create a data source manually (under the control panel) orCodeCreate (seeDynamic Data Source Creation

).

However, if you want to unlock the data source while creating the data source, you can only manually:

After entering the data source name, click "advanced", and then enter the login name and password (that is, the Access Database Password.

Method 2: Unlock when binding a record set category:

After the record set class is bound as usual (set the record set class to cxxset, the Database Password to 123, and the login name to any, for example, God): Open xxset. CPP file, add the yellow part in cxxset: getdefaconnect connect:

Cstring cxxset: getdefaconnect connect ()
{
Return _ T ("ODBC; DSN = bookmanage; Uid = God; Pwd = 123.
");
}

In this way, the record set cxxset can access the database smoothly.

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.