The microsoft.ace.oledb.12.0 provider is not registered on the local computer

Source: Internet
Author: User

Recently did a host computer project, met a lot of problem points, has no time to summarize. Now the project is over, to summarize, all through the network to find data to solve. Thanks again to those seniors, once again to do a record, convenient peer reference, but also convenient for their own later view.

The interface is as follows:

One: Problem point, do when the user logged on: "" is not registered on the local computer microsoft.ace.oledb.12.0 provider "" the Bullet Box error.

Here is the code

usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;usingmoudelii;namespacetemplate{ Public Partial classFrmlogin:form { PublicFrmlogin () {InitializeComponent (); }        Private voidButton1_Click (Objectsender, EventArgs e) {            Try            {                stringuser =TextBox_UserName.Text.Trim (); stringPWD =TextBox_Password.Text.Trim (); if(User = ="") || (pwd = ="") {MessageBox.Show ("The user name or password is wrong! "); return; }                //string strconn = "Provider=microsoft.ace.oledb.4.0;data source=" + Application.startuppath + @ "\DB_USERMSG.ACCDB"                ; //modaccess access = new Modaccess (strconn);                stringsql ="SELECT * from Tbuserinfo where username= '"+ user +"' and password= '"+ pwd +"'"; DataTable DT=ComData.dbUser.ExecuteDataTable (SQL); if(dt. Rows.Count >0) {Comdata.userlevel= Convert.ToInt32 (dt. rows[0]["UserLevel"]); Comdata.username= dt. rows[0]["UserName"]. ToString ().                    Trim (); MessageBox.Show ("Login Successful! ");  This.                Hide (); }                Else{MessageBox.Show ("The user name or password is wrong! "); }            }            Catch(Exception ex) {MessageBox.Show (ex).            Message); }        }        Private voidTextbox_password_keypress (Objectsender, KeyPressEventArgs e) {            if(E.keychar = ='\ r') {button1_click (sender, E); }        }    }}

     Public Static new modaccess ("provider=microsoft.ace.oledb.12.0;data source="@ " \db_usermsg.dat

User and password, save to:

Db_usermsg.dat's file inside.
In the development of the computer without error, but copied to the device host computer will be reported: "" is not registered on the local computer microsoft.ace.oledb.12.0 provider "". The error prompt.

Second: The solution: https://q.cnblogs.com/q/43682/ found this predecessor's blog, through his method can be resolved, again express thanks.
Download link Address
Http://download.microsoft.com/download/7/0/3/703ffbcb-dc0c-4e19-b0da-1463960fdcdb/AccessDatabaseEngine.exe

Will download the

The software can be installed to the computer to solve.

The microsoft.ace.oledb.12.0 provider is not registered on the local computer

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.