I am trying to connect to a SQL Server.
I am trying to use the SqlConnection
object in C#, I've tried putting a domain before my username and I've tried with and without the portnumber
SqlConnection myConnection = new SqlConnection("user id=username;" +
"password=xxxxx;" +
"server=ipaddress:portnumber;" +
"Trusted_Connection=yes;" +
"database=databaseName; " +
"connection timeout=30");
try
{
myConnection.Open();
}
catch(Exception ex)
{
}
I don't get any error message, it just hangs at myConnection.Open