private void button1_Click_1(object sender, EventArgs e) { SqlConnection conn = null; try { conn = new SqlConnection(@"Data Source=HAIDER-IT;Initial Catalog=csoft;Integrated Security=True"); conn.Open(); SqlCommand cmd = new SqlCommand("Search",conn); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandTimeout = 1800; cmd.Parameters.Add("@P_prd", SqlDbType.VarChar, 50).Value = "11"; cmd.Parameters.Add("@P_rep", SqlDbType.VarChar, 50).Value = "31"; cmd.Parameters.Add("@P_yy", SqlDbType.VarChar, 50).Value = "2008"; cmd.Parameters.Add("@P_mm", SqlDbType.VarChar, 50).Value = "04"; cmd.Parameters.Add("@P_HS", SqlDbType.VarChar, 50).Value = "1"; int I = cmd.ExecuteNonQuery(); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { conn.Close(); } MessageBox.Show("Data Inserted"); }
myProgressBar.Style = ProgressBarStyle.Marquee;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)