Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

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...