problems opening db

Discussion in 'ASP General' started by Christopher Brandsdal, Jul 26, 2004.

  1. Hi!

    I'm woking on my cms sytem.

    I want to do this:

    My admin system lies on one domain on the server. eg. d:\binaer\admin\

    When the clients open the admin page, the system opens the clients database.
    eg. d:\clientsdomain\db\


    But when I try to open a database wich is not on the same domain, BUT on the
    same harddisk I get this error:


    Microsoft JET Database Engine error '80004005'

    Not a valid file name.

    /nova/execute_login.asp, line 30



    I know it works to open a database from anoter iis accont, because I have
    tried to do this with
    http://www.aspcode.it/store/store.asp?lang=0&a1=showprod&id=15

    With the database editor I can browse the whole harddisk, and open wich ever
    database i want to....



    The code I used to open the database looks like this:

    AdoConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data
    Source=d:\fagernesweb.no\sites\centrumur\nova\_db\db.mdb"

    cn.Open(AdoConnection)



    Then I get the error



    Microsoft JET Database Engine error '80004005'

    Not a valid file name.

    /nova/execute_login.asp, line 30
     
    Christopher Brandsdal, Jul 26, 2004
    #1
    1. Advertising

  2. Well, the error is pretty self-explanatory. d:\clientsdomain\db\ is not a
    filename, that's a folder. If you are trying to open an Access database,
    you need to give it the filename, e.g. d:\clientsdomain\db\somefile.mdb

    > AdoConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data
    > Source=d:\fagernesweb.no\sites\centrumur\nova\_db\db.mdb"


    Are you sure this file exists? Can you navigate to it on the same machine
    using Windows Explorer? Is d:\ on the same machine or is it a mapped drive?

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)
     
    Aaron [SQL Server MVP], Jul 26, 2004
    #2
    1. Advertising

  3. hmm got it right now...
    the strangest thing...
    It did not accept the \ slashes, but only the / slashes...
    So I just changed it to / slashes, and the code worked :)

    But thanks for the help :)

    "Aaron [SQL Server MVP]" <> wrote in message
    news:...
    > Well, the error is pretty self-explanatory. d:\clientsdomain\db\ is not a
    > filename, that's a folder. If you are trying to open an Access database,
    > you need to give it the filename, e.g. d:\clientsdomain\db\somefile.mdb
    >
    > > AdoConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data
    > > Source=d:\fagernesweb.no\sites\centrumur\nova\_db\db.mdb"

    >
    > Are you sure this file exists? Can you navigate to it on the same machine
    > using Windows Explorer? Is d:\ on the same machine or is it a mapped

    drive?
    >
    > --
    > http://www.aspfaq.com/
    > (Reverse address to reply.)
    >
    >
     
    Christopher Brandsdal, Jul 26, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Henke
    Replies:
    5
    Views:
    703
    Henke
    Oct 19, 2004
  2. Sharon McCarty
    Replies:
    0
    Views:
    306
    Sharon McCarty
    Nov 11, 2004
  3. Roger Levy
    Replies:
    0
    Views:
    359
    Roger Levy
    Feb 26, 2004
  4. Jerry Manner
    Replies:
    2
    Views:
    6,612
    SpaceGirl
    May 30, 2005
  5. fniles
    Replies:
    0
    Views:
    290
    fniles
    Apr 26, 2009
Loading...

Share This Page