Click to See Complete Forum and Search --> : Connection string error


slyfox
02-16-2004, 08:12 PM
Hi friends

I have a .mdb file in the same directory as the file that's pointing to it.... but every time I open a page that uses the database connection I get the following error:

'C:\WINNT\system32\images\mydb.mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.

Can someone please tell me how to fix this... thanks!:)

buntine
02-16-2004, 11:07 PM
Is your database is that directory? If so, remove it. You should not place files within the system32 folder.

You have to use the mapPath method if you want to get the correct directory.


server.mapPath("your_database.mdb")


Regards,
Andrew Buntine.

slyfox
02-17-2004, 11:04 AM
hehe! thanks buntine!!!:D

buntine
02-17-2004, 11:15 AM
Thats ok;) ASP has several good functions like that.