Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    Senior Coder
    Join Date
    May 2004
    Posts
    1,466
    Thanks
    15
    Thanked 0 Times in 0 Posts

    connection to access database on network server

    I have 2 servers networked.

    server 1 is my webserver

    server 2 has my access database and has a username and password to get on.

    I am having trouble connecting to the database(from asp) on the other server:

    i'm using the path as \\ip\\folder\db.mdb

    i passed in the connection the username and password. -- it is not working.

    I also tried creating a dsn on the first server to the second server with username and password but this won't open either from the asp code.

    I get a permission error when trying to open it.

    any ideas?

  • #2
    New Coder
    Join Date
    Nov 2006
    Posts
    47
    Thanks
    2
    Thanked 1 Time in 1 Post
    Did you try giving permissions for that share to the ASP.NET Account?

  • #3
    Senior Coder
    Join Date
    May 2004
    Posts
    1,466
    Thanks
    15
    Thanked 0 Times in 0 Posts
    i tried giving full permissions and it didn't help.

  • #4
    New to the CF scene
    Join Date
    Jul 2002
    Location
    York, England/UK
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    are the permissions on the folder or the database file?

    this is a string I usually use for access, though it requires that you have a virtual folder set up for the db. might work for you...

    Code:
    db = server.mappath("/path/to /mdb/from/web/root/file.mdb")
        cst = "provider=microsoft.jet.oledb.4.0; data source=" &  db & ";user id=;password=;"
        set conn = CreateObject("ADODB.Connection") 
        conn.open cst

  • #5
    Senior Coder
    Join Date
    May 2004
    Posts
    1,466
    Thanks
    15
    Thanked 0 Times in 0 Posts
    in your case above was the username and password of the database or the folder? I think my issue is that the db is not password protected but the directory that the db is in is password protected.

  • #6
    New to the CF scene
    Join Date
    Jul 2002
    Location
    York, England/UK
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If the folder is the problem, I'd hazard a guess that your web anon user account is missing from the permissions ? This is an NTFS rather than ADO perms thing, I think.

  • #7
    Senior Coder
    Join Date
    May 2004
    Posts
    1,466
    Thanks
    15
    Thanked 0 Times in 0 Posts
    but i tried setting it to full permission and that didn't help - wouldn't that solve it if it was a permmision problem?

  • #8
    New to the CF scene
    Join Date
    Jul 2002
    Location
    York, England/UK
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    if the two servers are on the same domain, yes. If not, the permissions need to be explicit from domain1/iusr_...... to domain2

  • #9
    Senior Coder
    Join Date
    May 2004
    Posts
    1,466
    Thanks
    15
    Thanked 0 Times in 0 Posts
    the first server is a web server.
    the second is not a webserver but just a server in the office networked to the web server.
    what do i have to do to set the proper permissions?
    all I did so far is right click and go to sharing and give full sharing.

  • #10
    New to the CF scene
    Join Date
    Jul 2002
    Location
    York, England/UK
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I find that being explicit on the permissions for the share helps.
    YOu also need to make sure the folder used for 'temp' has the same read/write access.

  • #11
    Senior Coder
    Join Date
    May 2004
    Posts
    1,466
    Thanks
    15
    Thanked 0 Times in 0 Posts
    how do I do this?


  •  

    Posting Permissions

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