 <p>It's probably worth just testing if the following works:</p> <pre><code>SqlConnection con = new SqlConnection("Data Source=server;Initial Catalog=Invoicing;Persist Security Info=True;ID=id;Password=pw"); </code></pre> <p>To me it looks like your connection string is probably not right - there's no user provided. I use the following connection string: "Data Source=ServerNameHere;Initial Catalog=DBNameHere;User ID=XXXX;Password=XXXX"</p>