简体   繁体   中英

Read a remote MS Access database C#

I need to get a connection string from a remote location to access my MS Access database. I know you can do this like:

OleDbConnection con = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Temp\\Testdatabase.accdb");

So I need to know how to access a file if it were hosted. So the source would be http://somewebsite.com/Testdatabase.accdb

How do I do this?

The answer is simple: You can't do this.

Access needs an SMB fileshare which you can't get from a web server. Neither can you attach a database file from an FTP server, OneDrive, or DropBox.

So either convert the remote database to a server engine like SQL Server or MySQL, or (if you only need to read) download the Access file to a local drive.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM