简体   繁体   中英

how to connect a C# project with Access database placed on server (NOT local network) to edit and view?

I have some Databases built in Access and I want to be able to view and edit them when I'm not connected to a local server\\network.

How can I access with C# to view and edit the Access databases placed on a server without VPN or SMB (which means creating local network). Is it possible to edit it realtime on the server?

This needs to be accessed by more than one people, thus I also want for example block a table if one's already editing it (so here also goes the FTP protocol - to download and edit on the PC and reupload)

I hope I was clear enough and provided enough info, thanks for all helpers!! Enlighten me please :)

We would first have to ask how end users going to run and use the C# program?

Desktop: users would need a network connection to the server. (most likly a VPN).

Web based: users would need a network connection to the WEB SERVER. This could also be a VPN, or could be a web server that is public facing. this would then require logons for security.

If users don't have a network connection, then it not going to matter if this is oracle, MySQL, SQL server or Access. And in fact, if this is web based, then users need to be able to connect to that web server.

So, without some kind of network connection to that server or computer where the data resides, and you eliminated a VPN, then your options are limited.

You can build a web site and place it on a server. However, if users don't have any kind of network connection even in the case of a web site, then I fail to see how you can even suggest using FTP let alone any other kind of connection.

This needs to be accessed by more than one people,

Ok, you need multi-user. However the locking up a whole table on sql server to allow only one user is actually quite difficult.

But, we can leave that you want one user in a given table at one time. (but both Access and a web site would in fact allow multiple users - even editing the same table).

All in all? Then this suggests the most obvious solution: run a web server, and that would allow any user to connect to the web site, and the web site then can read/talk/use the access database that resides on that server. And this then again means that you don't need any client software installed.

FTP is not a practial solution - since it only works on a whole file.

So, users will require some means to connect to some server. That being the case, then write your C# appliation as web based, and thus no client software will be required, and the only software that interacts with the access file on that server will be the web site.

So, running a web site on that server does seem to be the best option. So, we heading towards a web solution.

So then software would stay and run 100% on the server side, and thus zero client software would be required other then that of a browser.

I developed a simple Python web server to work with the Access DB via HTTP:

https://github.com/vikilpet/MS-Access-HTTP-Server

Probably this is not an ideal solution for your case but it may be a good starting point.

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