Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

i'm trying to connect to an Access Database which is located on the desktop's server. I tried this :

DatabaseAcces dbSAP = new DatabaseAcces(@"Provider=Microsoft.Jet.OLEDB.4.0;Data   Source=C:\\Users\\adm_sharepoint\\Desktop\\PPMO\\BDD-Access\\BDD_PPMO_SAP.accdb");
DataSet dsCarneOffre = dbSAP.executeQuery("SELECT * FROM CarnetOffres");

And I try to connect with this function :

private void connexionOpen(){
        connect = new OleDbConnection(connexionString);
        connect.Open();
}

But when i arrive to the line

connect.Open()

i get this error :

"The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine." Source="System.Data"

Do you guys have any idea what to do ? Thanks

share|improve this question

1 Answer 1

up vote 0 down vote accepted

SharePoint is 64 bit code and can't call 32 bit libraries.

Jet is only 32-bit see How to get a x64 version of Jet?

But you may be able to use Microsoft Access Database Engine 2010 Redistributable

share|improve this answer
    
Thanks for this answer. I think i'll use sql server then. –  Thoma Bigueres Jun 4 '12 at 17:05
    
That's an EXCELLENT choice –  Per Jakobsen Jun 4 '12 at 18:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.