How to use ADO.net to connect to database access file stored in OneDrive?

  ado.net, c++

I have an access file database.accdb stored in my OneDrive that is accessible and is set to share the said file. I normally save the database to my pc and access it using Ado.net without any problems however I want to push my luck by attempting to connect to my database stored in a online storage systems like OneDrive and Google Drive. However, I get the following exception:

Unhandled Exception: System.Data.OleDb.OleDbException: Your network access was interrupted. To continue, close the database, and then open it again.

whenever I try to connect to the online database file using the following code in my app.config

<?xml version="1.0" encoding="utf-8" ?>
  <configuration>
    <connectionStrings>
      <clear/>
      <add name="ARRAY[FOO]"
      connectionString=
      "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=https://1drv.msLinkHidden"
      providerName="System.Data.OleDb" />
    </connectionStrings>
  </configuration>

I know that there are existing and much better online database systems integration with c++ out there however I am just curious if I can connect to the database file stored online using ADO.net and C++

Source: Windows Questions C++

LEAVE A COMMENT