Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted

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

  • Moderators
Posted

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

Visit...Bassic Software
Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...