Question

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

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top