Data exchange between two access databases

Source: Internet
Author: User

In the current project, you need to import some data from a table in an Access database to another access database. For this reason, you have thought of multiple methods. First, you should consider using the access chain table, however, if you want to implement the link in the program, you need to use ADOX and add a new reference. Later, I considered using a program to save the data in the datatable of the program. Of course, this method does not require any new reference, but it is also troublesome to implement. After all, the SQL statement is not easy to spell, in addition, the speed is also greatly reduced. Today, I searched the internet and found that the following method can achieve the link effect without adding ADOX reference. This is a good choice.

Access tables in another MDB from one MDB

Select *
From table name in 'd: \ test. MDB'

-- Or

Select *
From [; database = D: \ test. mdb]. Table Name

However, it should be noted that the user and password must be consistent between the two access databases, otherwise the password will be invalid.

The password is inconsistent. You can use the following method:
Select *
From [; database = D: \ test. mdb; Pwd = yourpwd;]. Table Name

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.