Hi Forum why is that my app crashes when connecting to the database server that it is in the US
here is my code for connecting to database
SqlConnectionStringBuilder dbConnect = new SqlConnectionStringBuilder();
dbConnect.DataSource = "my.rem.servr.host";
dbConnect.UserID = "test123456";
dbConnect.Password = "XXXXX";
using (var ConnectedtoDatabase = new SqlConnection(dbConnect.ConnectionString))
{
try
{
ConnectedtoDatabase.Open();
Label label = new Label
{
Text = "Success connecting"
};
Content = label;
}
catch (SqlException)
{
Label label = new Label
{
Text = "Fail on Connecting"
};
Content = label;
}
}