problems opening db

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Christopher Brandsdal

    problems opening db

    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:\clientsdomai n\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.a sp, line 30



    I know it works to open a database from anoter iis accont, because I have
    tried to do this with


    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=Micro soft.Jet.OLEDB. 4.0;Data
    Source=d:\fager nesweb.no\sites \centrumur\nova \_db\db.mdb"

    cn.Open(AdoConn ection)



    Then I get the error



    Microsoft JET Database Engine error '80004005'

    Not a valid file name.

    /nova/execute_login.a sp, line 30


  • Aaron [SQL Server MVP]

    #2
    Re: problems opening db

    Well, the error is pretty self-explanatory. d:\clientsdomai n\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:\clientsdomai n\db\somefile.m db
    [color=blue]
    > AdoConnection = "Provider=Micro soft.Jet.OLEDB. 4.0;Data
    > Source=d:\fager nesweb.no\sites \centrumur\nova \_db\db.mdb"[/color]

    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?

    --
    Please contact this domain's administrator as their DNS Made Easy services have expired.

    (Reverse address to reply.)


    Comment

    • Christopher Brandsdal

      #3
      Re: problems opening db

      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]" <ten.xoc@dnartr eb.noraa> wrote in message
      news:uLBGxrxcEH A.2384@TK2MSFTN GP09.phx.gbl...[color=blue]
      > Well, the error is pretty self-explanatory. d:\clientsdomai n\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:\clientsdomai n\db\somefile.m db
      >[color=green]
      > > AdoConnection = "Provider=Micro soft.Jet.OLEDB. 4.0;Data
      > > Source=d:\fager nesweb.no\sites \centrumur\nova \_db\db.mdb"[/color]
      >
      > 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[/color]
      drive?[color=blue]
      >
      > --
      > http://www.aspfaq.com/
      > (Reverse address to reply.)
      >
      >[/color]


      Comment

      Working...