Results 1 to 3 of 3

Thread: [Access] Connecting to database on a webserver

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    [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?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Re: [Access] Connecting to database on a webserver

    Quote Originally Posted by jmcilhinney View Post
    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width