PDA

View Full Version : DB error ? or ...


2Fast2BCn
11-09-2004, 01:31 AM
'E:\web\allnicebe02\htdocs\ambo\_database\amboDB.m db' 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. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: 'E:\web\allnicebe02\htdocs\ambo\_database\amboDB.m db' 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.

Source Error:





An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.








After I get this error, I upload the same (unchanged) "Web.conf"-file and the error is gone for some time...


After a while the errorisback


Is there a way to solve this problem?


It's like the database url changes while using the webapplication. I extract the database url in my "global.asax"-file in the "Application_Start"-methode. By using Server.MapPath("../")+relativePath

www.allnice.be (http://www.allnice.be)

Post Edited (2Fast2BCn) : 11/9/2004 1:35:44 PM GMT

bruce
11-09-2004, 08:39 AM
THis error is usually caused by the fact that the application is not able to locate or open the mdb file.

Are you sure the database file is at the correct location? Would you be updating the database with FTP or something?

Bruce

DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)

2Fast2BCn
11-10-2004, 08:50 AM
The path is incorrect...
But the webapplication initialyworks fine.
After a while the application changes it's Server.MapPath("../")+relativePath
Looks like it does something like that.

I'll try to parse the Server.MapPath("../")
So that if it changes I can adjust the url
guess that's going to work.

www.allnice.be (http://www.allnice.be)

Michael
11-18-2004, 05:03 AM
Have you fixed this.... ?


I would have thought the problem could have been using Server.Mappath("../")


of course this is going to change, it is going to depend on what directory the application is running in at the time, it is a relative path.


I would have just thought you would need Server.Mappath("/") & "_database\dbname.mdb"


I orignally had problems like this and it was solved by using just Server.Mappath("\")


not sure if I have slashes the correct way or not, but thats my thoughts.


Mikey