Pizzor2000 Posted December 9, 2004 Posted December 9, 2004 I have an ASP.Net application that accesses an SQL Server database. When I run the project locally, I can use the following connection string to connect to the local copy of the database using the following connection string: conn = New SqlConnection("server=localhost;uid=pizzor2000;pwd=whatever;database=MyDB") When I publish the application, however, I will need to connect to the copy of the database on the server, so it would probably be easier if I can remote-connect to it. How would I set up the connection string to connect to a database on a remote server? Quote
Administrators PlausiblyDamp Posted December 9, 2004 Administrators Posted December 9, 2004 change the server=localhost bit to reflect the name of the server hosting the database. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
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.