1
votes

I have an window application in which I am trying to connect to a Access Database that has a table linking to a SharePoint list using OLEDB in C#

My attempts:

  1. Use Access 2007 format for the database and Microsoft.ACE.OLEDB.12.0 for the ConnectionString
    • Everything works perfectly okay, until there's one guy reports the error "The 'Microsolf.ACE.OLEDB.12.0' provider is not registered on the local machine"
    • Check: he has Windows x86, Access 2003, but not 2007, and does not have "2007 Office System Driver: Data Connectivity Components" installed
    • Really troublesome and time-consuming to get these installed (Company's machine)
  2. Use Access 2003 format for the database and Microsoft.ACE.OLEDB.12.0 for the ConnectionString
    • Same error as the above. So I guess it is the "Microsoft.ACE.OLEDB.12.0" that causes the problem. But I don't know how to get it fixed.
  3. Using Access 2003 format for the database and Microsoft.Jet.OLEDB.4.0 for the ConnectionString
    • Error on my machine: "Could not find installable ISAM" (I don't have Access 2003, but only Access 2007)
    • His machine: works perfectly

Please help me point out what I can do to fix this problem without having every one update their Office version to 2007 or having the application check people's Office version before connecting to the Access database.

Thanks in advance.

1
You rule out the installation of '2007 Office System Driver' so you rule out also your point 1 and 2. I will try to sort out the "Could not find installable ISAM" andSteve
I guess you are creating your app using 32 bit ACE drivers, so the Jet 4.0 drivers should be okay with your machine. Before I switched to 64, I had both ACE and Jet : support.microsoft.com/kb/829558Fionnuala
@Steve Yes, looking forward to your help. I think this should be able to be fixed, as I believe that Microsoft Office should be backward compatible, right?Phu Tran Thanh
What I currently do is to check what Office version is installed on the machine, then use the corresponding database and connection. Not an ideal solution though..Phu Tran Thanh

1 Answers

1
votes

You as a general rule cannot link to something else that is linking to the data!

If the data sitting on SharePoint why attempt to use Access here? You could never link to an Access database that has linked tables to SQL server, so this makes even LESS sense to hit SharePoint this way.

And worse I don't believe that SharePoint supports oleDB linked tables. While Access does support oldDB, and you trying to connect o Access you want to keep in mind that ADO been rather depreciated. While the Access data engine continues to receive all kinds of new features like complex data support (multi-value SharePoint columns), and things like a new-off line disconnected mode we have for Access 2010 with SharePoint, these features are certainly not appropoate to consume by attempting to link to linked tables. As noted, because Access is linked to SQL server or SharePoint in the past, no one would suggest you now attempt to link to the Access file which then in turn must make web service calls to SharePoint (BTW, Access makes web services calls to SharePoint to consume that data).

Since the data is on SharePoint, why are you attempting to hit some file based "thing" sitting on a local hard drive? Why don't you just hit the SharePoint site as a web service? There are tons of web services and ways to consume SharePoint lists in .net. I see little reason and advantage to dump all that fantastic technology and ability in .net to consume web services and then attempting to read some file based Access database that has links to SharePoint. The only way such a setup makes sense is if your development is primary in Access, and that then DOES make sense to dump the use of c# here and just use Access.

My suggestion is thus to consume the SharePoint lists in c#, and by-pass the Access data engine here.