About C # Joining a database is a workaround for the ' not registered on local computer ' error

Source: Internet
Author: User
Tags access database

There's a weird problem with using C # to connect to an Access database today.

The Microsoft.ACE.OLEDB is not registered on the local computer. 12.0"Provider

Some of our code is as follows:

            string " Provider=microsoft.ace.oledb.12.0;data source= " ;             string str = System.Environment.CurrentDirectory;             " \\Database.accdb " ;    

So the question is in the first sentence, actually just see this thing, my roommate and I look like this

Because this code is the last semester of our C # final work of the code, is the test of the defense can run code!!! (10,000 head Grass Mud horse ~)

However, we have no way, can only first go to Baidu, hehe, did not solve.

Then I search for stack overflow and find a solution that most people agree with, but

Step Big Big trouble, I do a little trivial, this input is not proportional to output.

URL posted out, interested in crossing can try

http://stackoverflow.com/questions/6649363/ Microsoft-ace-oledb-12-0-provider-is-not-registered-on-the-local-machine

Finally, this problem is resolved by a degenerate format (. mdb) that was saved as 2000 after opening the file with access2016

Then change the top code to

string " Provider=Microsoft.Jet.OLEDB.4.0;Data source= ";

Then you can change the file name. ~ ~ ~

The end of the sprinkle flower 23333333333

About C # Joining a database is a workaround for the ' not registered on local computer ' error

Related Article

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.