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