timothy2l Posted October 21, 2003 Posted October 21, 2003 I created a project on my machine and uploaded the files to a server folder. I changed the connection strings to the database in all of my "aspx.vb" files, but for some reason the following error occurs: 'C:\Inetpub\wwwroot\AlumniProject\Databases\alumniDatabase.mdb' is not a valid path. This is the old path and is not what's in the code and it does this for all pages that connect to the database. It's like it doesn't recognize that I have made the changes. Are there any other files that contain connection info that need to be changed? Thanks Quote
Moderators Robby Posted October 21, 2003 Moderators Posted October 21, 2003 Open all your pages and perform a find on that string. Did you use a wizard to create you connection string? Quote Visit...Bassic Software
timothy2l Posted October 21, 2003 Author Posted October 21, 2003 I've performed the search for the string and I've replaced all instances where it was found. When i view Server Explorer, the connection link shows the same one as the one in the error msg. Can i change the path from server explorer with a general path using MapPath instead of a direct path? If so, can you explain how to do it? Thanks Quote
timothy2l Posted October 21, 2003 Author Posted October 21, 2003 Also, I did use the connection wizard to create the link. Quote
Moderators Robby Posted October 21, 2003 Moderators Posted October 21, 2003 Wow, so if you have 100 aspx pages, you have to change 100 connection strings. Ouch! yes you can use the map path option and create one central connection string in a class or property Quote Visit...Bassic Software
timothy2l Posted October 21, 2003 Author Posted October 21, 2003 I guess there's simpler ways to do it. Luckily there are only 5 aspx pages. When viewing the connection in the Server Explorer, the properties are disabled so I can't change anything, only read the information. Any ideas on how I can change the path? Also, when changing the path using MapPath, would it appear exactly like this: " & Server.MapPath("Databases\alumniDatabase.mdb") & " Thanks for your help Quote
timothy2l Posted October 21, 2003 Author Posted October 21, 2003 The "Modify Connection" is also disabled when right clicking the Connection. Quote
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.