NCC10281982B Posted October 2, 2004 Posted October 2, 2004 I keep getting the following error on my page. Server Error in '/' Application. -------------------------------------------------------------------------------- 'c:\websites\ullr\..fpdb\students.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. 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: 'c:\websites\ullr\..fpdb\students.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. Source Error: Line 18: objCommand = New OleDbCommand(sql, objConnection) Line 19: Line 20: objConnection.Open() Line 21: objDR = objCommand.ExecuteReader(system.data.CommandBehavior.CloseConnection) Line 22: BssDataGrid.DataSource = objDR I keep getting the following error on my page. Server Error in '/' Application. -------------------------------------------------------------------------------- 'c:\websites\ullr\..fpdb\students.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. 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: 'c:\websites\ullr\..fpdb\students.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. Source Error: Line 18: objCommand = New OleDbCommand(sql, objConnection) Line 19: Line 20: objConnection.Open() Line 21: objDR = objCommand.ExecuteReader(system.data.CommandBehavior.CloseConnection) Line 22: BssDataGrid.DataSource = objDR Source File: c:\websites\ullr\secure\editrecords.aspx Line: 20 The script is located at: c:\websites\ullr\secure\editrecords.aspx The Database file is located at: 'c:\websites\ullr\fpdb\students.mdb' I have tried the following code to make the script run, all of which return an error like the one above. objConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("..\fpdb\students.mdb") & ";") objConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("\..fpdb\students.mdb") & ";") objConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source="'c:\websites\ullr\fpdb\fpdb\students.mdb") Source File: c:\websites\ullr\secure\editrecords.aspx Line: 20 The script is located at: c:\websites\ullr\secure\editrecords.aspx The Database file is located at: 'c:\websites\ullr\fpdb\students.mdb' I have tried the following code to make the script run, all of which return an error like the one above. objConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("..\fpdb\students.mdb") & ";") objConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("\..fpdb\students.mdb") & ";") objConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source="'c:\websites\ullr\fpdb\fpdb\students.mdb") Quote Share this post Link to post Share on other sites More sharing options...
LobbDogg Posted October 2, 2004 Posted October 2, 2004 I'm not too familar with ASP, but I'm gonna give it a shot here, maybe for the path instead of c:\websites\ullr\..fpdb\students.mdb it should be like localhost/.../fpdb/students.mdb instead. ? Just a thought. Quote Share this post Link to post Share on other sites More sharing options...
markiemrboo Posted October 2, 2004 Posted October 2, 2004 C:\websites\ullr\..fpdb\students.mdb Looks to me like the .. is your problem if it's located at ullr\fpdb\students.mdb? Quote Share this post Link to post Share on other sites More sharing options...
NCC10281982B Posted October 3, 2004 Posted October 3, 2004 Does this look right?? objConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("../fpdb/students.mdb") & ";") Seems like it should work. Quote Share this post Link to post Share on other sites More sharing options...
markiemrboo Posted October 3, 2004 Posted October 3, 2004 what's the ../ for? that goes back a directory... and if you're in ullr you'd just want to go ./fpdb/students.mdb, right? Quote Share this post Link to post Share on other sites More sharing options...
NCC10281982B Posted October 4, 2004 Posted October 4, 2004 The script is located at: c:\websites\ullr\secure\editrecords.aspx The Database file is located at: 'c:\websites\ullr\fpdb\students.mdb' So i'm needing to switch directories. Quote Share this post Link to post Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.