public static bool connectDB() { try { Variables var = new Variables(); string connection = Properties.Settings.Default.serverUrl; var.connection = new SqlConnection(connection); var.connection.Open(); //takes time to execute this step { //set of commands executes after time lag; } var.connection.Close(); return true; } catch (Exception ex) { MessageBox.Show("Error while conneting to database" + ex.Message,"Demo",MessageBoxButtons.OK,MessageBoxIcon.Error); return false; throw; } }
Data Source=159.70.76.16;Initial Catalog=Itemsense;Integrated Security=True; max pool size=1000
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)