title: Database Connection in VB.NET Windows Forms
body: <p>I have a problem with connecting to a server which is another machine. When I try connecting to my machine with the following code, it works fine:  </p>
  
  <pre><code>'connString = "Data Source = .\sqlexpress;" &amp; _  
  '"Initial Catalog = one;" &amp; _  
  '"Integrated Security = SSPI"  
  
  Try  
    conn = New SqlConnection(connString)  
    conn.Open()  
    MessageBox.Show("Connection Successful")  
  Catch ex As Exception  
    MessageBox.Show(ex.Message)  
  End Try 
  </code></pre>
  
  <p>But when I try to get connected to another machine where SQL Server 2000 is installed, I get a timeout message. The code is as follows:  </p>
  
  <pre><code>connString = "Server = xxx.xxx.xxx.xxx;" &amp; _  
      "Initial Catalog = one;User Id=xxxx; Password=xxxxx;" &amp; _  
      "Integrated Security = SSPI"  
  
      Try  
        conn = New SqlConnection(connString)  
        conn.Open()  
        MessageBox.Show("Connection Successful")  
      Catch ex As Exception  
        MessageBox.Show(ex.Message)  
      End Try 
  </code></pre>
  
  <p>Can anyone please help me on this issue?</p>