Workaround for "microsoft.jet.oledb.4.0" provider not registered on the local computer

Source: Internet
Author: User

The following code, the interrupt point error: "Microsoft.Jet.OLEDB.4.0" Provider is not registered on the local computer

DataSet ds=NewDataSet ();Try { stringStrcon =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e:/test.xls; Extended properties= ' Excel 8.0; Hdr=yes;imex=1 '"; OleDbConnection Olecon=NewOleDbConnection (Strcon); Olecon.open (); OleDbDataAdapter Oleda=NewOleDbDataAdapter ("select * FROM [sheet$]", Olecon); Oleda.fill (DS); }Catch(Exception ex) {MessageBox.Show (ex). Message+ ex. Source +Ex. innerexception); } 

Issues and workarounds to be aware of:
1.microsoft.jet.oledb.4.0 do not write miscrosoft.jet.oledb.4.0,;
2.Data source does not write "Data sourse",
3. Check if Office is installed
4. Reinstall the registration MDAC28.exe (usually in your VS installation directory or up to Microsoft's official website)
Http://www.jb51.net/softs/20587.html
5. This may also occur if you are a 64-bit platform; Workaround: Click on the "Any CPU tab--new" new platform with Configuration Manager--

Workaround for the microsoft.jet.oledb.4.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.