I try to connect to a local database with the connection string that offers Visual Studio
in the object browser SQL
.
The code is as follows:
private void Form1_Load(object sender, EventArgs e)
{
SqlConnection myCon = new SqlConnection(@"Data Source=GS1512;Initial Catalog=sxUnimageDev;Integrated Security=True;User ID=sa;Password=********;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False");
myCon.Open();
MessageBox.Show("Conectado");
}
When running the application, it keeps trying to connect, it does not show error messages.
Finally load the form but the message "Connected" does not execute it.
Thank you if you can help me.