2

I am moving the company SharePoint site from SP 2010 on premises to online 365.

I have a website for the vocations office here in our diocese which has a calendar. To update the calendar I enter the events into my SharePoint site and then use ASP (eventually moving to PHP) to query the SQL Server database directly to extract the events.

I read somewhere that going to 365 I won't have access to the database to query it. Can I instead, link to the 365 calendar using an access web database that I can query?

0

If you plan to use PHP, my advise would be to use the SharePoint rest api: https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/get-to-know-the-sharepoint-rest-service or the Microsoft Graph: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/sharepoint

Here's a sample connecting to the graph with PHP: https://github.com/microsoftgraph/php-connect-rest-sample

If you plan to use c# & .net, you could also use the CSOM api's.

You will need to get your data through on of these methods. Direct access to database is not an option.

  • Down the road I will be moving to PHP. For now I'm working with pages that were created using classic ASP. At this time, I'm not going to rewrite the page simply modify the data source from the SP 2010 SQL Server to the SP online list. – RCDAWebmaster Sep 13 '18 at 13:41
0

Down the road I will be moving to PHP. When I do, I will learn to use the SharePoint rest API. For now I'm working with pages that were created using classic ASP. At this time, I'm not going to rewrite the page and simply modify the data source from the SP 2010 SQL Server to the SP online list.

To achieve this, I created an access DB in which I linked the list. I then created a make table query that I can run before I do the import of data. This will allow me to connect from access to the SP 365 site and fetch records (calendar events) into a temporary table. I can then use this temp table as my source since it's local to the web page doing the import.

The problem I found was that I was unable to directly query the back end DB for SP 365 so I used an Access DB as an intermediary. The issue then became that the Access DB needed me to provide credentials for the site and wouldn't ask for them when I ran the query against the DB. Thus I had to create a make table query and run this programmatically upon open of the DB. This allows access to prompt me for credentials to the site and store the records locally. It's then business as usual.

I do understand that this is not the best solution as I have a lot of extra steps in order to get the data to flow as it did before. Another potential problem is that I run the import so infrequently that I might forget to open the DB and run the make table query. I added a confirm box to my web button via JavaScript as a reminder. "Did you open the Access DB and run the make table query? OK | Cancel". This will allow me to proceed or cancel.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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