[Access] Connecting to database on a webserver
Hi,
I have an ASP.NET website with an Access 2003 (mdb) database in the App_Data folder. The website communicates with the database.
Now I wrote a small desktop application (winforms, VB.NET) that I would like to use to connect to the database. This allows me to make changes to my website much more quickly (instead of having to go to the website itself).
Anyway, my problem is obviously connecting to the database. The database is on an FTP server, I know the address, but it is not publicly available (well, it shouldn't be). I obviously also have the FTP server credentials, though I have no idea where or how to apply them.
I tried simply changing the connection string so that it points to the FTP server location:
Code:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=ftp://ftp.nickthissen.nl/nickthissen.nl/wwwroot/Album2/App_Data/db.mdb;User Id=<my ftp login>;Password=<my ftp password>;
where I've obviously replaced the real login and password with <..> placeholders.
But yeah, that doesn't work... It throws an exception that says that it is not a valid filename.
How can I manage this?
Re: [Access] Connecting to database on a webserver
FTP is a protocol for transferring files. You can connect to a database over FTP. You can't even connect to a database over HTTP unless it has specific support built in that understands the HTTP GET and POST commands you send. Your MDB file needs to be on the same machine or he same network. If you want to use FTP then you will have to download the file, edit it locally and then upload it again.
Re: [Access] Connecting to database on a webserver
Quote:
Originally Posted by
jmcilhinney
FTP is a protocol for transferring files. You can connect to a database over FTP. You can't even connect to a database over HTTP unless it has specific support built in that understands the HTTP GET and POST commands you send. Your MDB file needs to be on the same machine or he same network. If you want to use FTP then you will have to download the file, edit it locally and then upload it again.
I was afraid of that. I suppose download/edit/upload could work, but I have three other users here that might use the app at the same time, in which case only one person's changes would be accepted... Oh well, I'll figure something out. Thanks!