title: Connecting to SQL Server database with Mono C#
body: <p>I am trying to migrate my service cross-platform with mono, but in attempting to connect to a SQL Server database I get the following timeout error</p>
  
  <blockquote>
    <p>Timeout expired. The timeout period elapsed prior to the completion of the operation or the server is not responding. at Mono.Data.Tds.Protocol.TdsComm..ctor <pre>
    at System.Data.SqlClient.SqlConnection.Open()</pre></p>
  </blockquote>
  
  <p>Databases are fairly new to me, but as far as I can tell from <a href="http://webcache.googleusercontent.com/search?q=cache%3aEHgvy4ZWB-AJ%3awww.mono-project.com/ADO.NET%20ado.net&amp;cd=1&amp;hl=en&amp;ct=clnk&amp;source=www.google.com" rel="nofollow">here</a> (Google cache page, mono site is down) accessing SQL Server databases is now possible in Mono. Is that correct?</p>
  
  <p>I attempted to structure my connection string as shown, but still no luck. My simple test code...</p>
  
  <pre><code>using (SqlConnection con = new SqlConnection(cs))
  
              {
  
                  con.Open();
  
                  SqlDataReader reader = null;
  
                  SqlCommand cmd = new SqlCommand("SELECT Parameter FROM Deltas", con);
  
                  reader = cmd.ExecuteReader();
  
                  reader.Read();
  
                      Console.WriteLine(reader["Parameter"].ToString());
  
                  con.Close();
  
              }
  </code></pre>
  
  <p>Am I missing any references or is my format incorrect? How can I connect using Mono C#?</p>
  
  <p>EDIT:</p>
  
  <p>Connection String, Defined globally and init in constuctor:</p>
  
  <pre><code>         cs = @"Server=xxx.xxx.xxx.xxx;
                 Database=myDB;
                 User ID=user;
                 Password=passwd;";
  
  
       cs = @"Data Source=xxx.xxx.xxx.xxx;
                 Network Library=DBMSSOCN;
                 Initial Catalog=myDB;
                 User ID=user;
                 Password=passwd;";
  </code></pre>
  
  <p>Top is me trying to conform to the mono example, bottom is what works with the .NET runtime.</p>