25 |
|
SqlConnection sqlCon = new SqlConnection(); |
26 |
|
try |
27 |
|
{ |
28 |
< |
sqlCon.ConnectionString = @"Data Source=" + dataServer + @"\SQLEXPRESS;Database='AnywhereTS';Integrated Security=True;Connect Timeout=30;User Instance=False"; |
28 |
> |
sqlCon.ConnectionString = Properties.Settings.Default.atsConnectionString; |
29 |
|
sqlCon.Open(); |
30 |
|
} |
31 |
|
catch (SqlException sql_ex) |
32 |
|
{ |
33 |
< |
MessageBox.Show("Could not connect to the datbase server. Please check your spelling and your connections. SQL Server Express error:\n" + sql_ex.Number.ToString() + " " + sql_ex.Message.ToString()); |
33 |
> |
MessageBox.Show("Could not connect to the datbase server. Please check your spelling and your connections. SQL Server error:\n" + sql_ex.Number.ToString() + " " + sql_ex.Message.ToString()); |
34 |
|
return; |
35 |
|
} |
36 |
|
|