DataSet ds = new DataSet(); SqlConnection con = new SqlConnection("Data Source=ACER-SVR;Initial Catalog=ISL;Integrated Security=True"); private void button1_Click(object sender, EventArgs e) { string select = "Select * from isltb"; SqlDataAdapter da = new SqlDataAdapter(select, con); SqlCommand insert = new SqlCommand("_insert", con); insert.CommandType=CommandType.StoredProcedure; insert.Parameters.Add("@com", SqlDbType.NVarChar).Value = textBox1.Text; insert.Parameters.Add("conper", SqlDbType.Text).Value = textBox5.Text; insert.Parameters.Add("@desig", SqlDbType.Text).Value = textBox6.Text; insert.Parameters.Add("@tel", SqlDbType.Int).Value= int.Parse(textBox4.Text); insert.Parameters.Add("@mob", SqlDbType.Int).Value= int.Parse(textBox7.Text); insert.Parameters.Add("@addr", SqlDbType.NVarChar).Value= textBox8.Text; insert.Parameters.Add("@email", SqlDbType.NVarChar).Value = textBox9.Text; con.Open(); insert.ExecuteNonQuery(); MessageBox.Show("...SUCCESS..."); da.Fill(ds, "isltb"); con.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)