Reputation: 27
I am making a VB.NET desktop app for MS Access. The database is linked to a Sharepoint site. I am wanting to use the "Work Online/Offline" function within Access so that the app can be used without a network connection.
Is it possible to execute the "Work on/offline" command through VB.NET? This way, I can have the code check for a network connection first and then choose the appropriate mode to use.
I know Access is not the best platform to be working with syncing on and offline databases, but I dont have the resources available for a SQL Server box and I am happy with the way the database is working now.
Thanks!
Upvotes: 0
Views: 251
Reputation: 49069
The automatic off line mode, and automatic sync feature of Access and share point is REALLY nice. And unfortunately, I don't believe the features and ability to sync and re-connect are exposed to the ACE engine. As a result, the features to sync with share point from JUST using the ACE data engine is not available.
In fact the features and options to do this from Access VBA are not exposed either. You can I believe execute a command to re-fresh the tables, but the prompt that shows you are "off" line and to re-connect to SharePoint will ONLY occur from the Access UI - not the database engine, nor the VBA object model.
About the only practical way to do this from .net is to adopt the .net sync framework and ALSO hope that you can find a SharePoint sync provider that been written for you, as its quite a bit of work to build and design your own sync framework. And if you built such a sync system, then your access application would have to be converted back to local tables only - and your .net system would manage the off line, on line, and the sync of data - not access anymore.
I do much wish this "amazing" feature in Access was exposed better as some API to Access (or other systems like .net), but it not. As noted, while the .net sync framework is depreciated, it sill likely the best option here. I think a sync provider for SQL server is available, so this would mean that you migrate the data from Access to SQL server, and on each machine run the free edition of SQL express, and then use + build the sync of data in .net. This would also mean that you not going to use SharePoint tables, but use sql server tables in the cloud part.
Do keep in mind that if you adopt the .net sync framework as opposed to replication, then both ends of sql server can be the free edition. Note that SQL express (free edtion) can be subscriber for replication, but the host can't be a free edition. However, if you use the .net sync framework, then you not using replication, and thus either ends can be free editions of sql server.
So, to answer your question? No, it not going to practical to use the sync to share point, and the auto "off line" and auto "on line" mode that Access has that makes this whole setup oh so easy. I am currently using this sync and SharePoint option with Access and office 365 - but office 365 is expected to drop support of this feature soon, and thus one will have to use SharePoint, as office 365 (cloud part) is dropping this feature.
Upvotes: 1