problems opening db

  • Thread starter Christopher Brandsdal
  • Start date
C

Christopher Brandsdal

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
 
A

Aaron [SQL Server MVP]

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

Christopher Brandsdal

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 :)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top