Sorry for the newbie question, but...
I have developed a website on my local development machine. When I create the connections string VS automatically creates a path to my local hard drive inside the string.
Data Source=.\SQLEXPRESS;AttachDbFilename="C:\Documents and Settings\Mike\My Documents\Visual Studio 2005\WebSites\PostAlertz\App_Data\PADatabase.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True
However, when I deploy this website to a remote server, SQLExpress tries to attach to the file using the wrong path. How do I fix this?
Your patience is appreciated...
Hi
Here is a sample connection string,and you can find more onhttp://www.connectionstrings.com/:
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
HOW-TO: Database from VWD to Shared Host tells you how to copy database to share host.
Hope this helps.
|||If you have SQL Express instance installed on the remote server, just set the correct path for the mdf file like:data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|PADatabase.mdf;User Instance=true
No comments:
Post a Comment