Tuesday 30 April 2013

Insert Command in Windows Form


string query = "insert into YEARMASTER(FromYear,ToYear,AccountYear) values('" + ff + "','" + tt + "','" + accyear + "')";
                            SqlCommand cmd = new SqlCommand(query, con);
                            cmd.ExecuteNonQuery();
                            MessageBox.Show("Saved Successfully");

No comments:

Post a Comment