1 2 3 4 5 6 7 8 9 10 11 12
| protected void Button2_Click(object sender, EventArgs e)
{
SqlCommand cmd;
SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\SecurityTutorials.mdf;Integrated Security=True;User Instance=True");
con.Open();
cmd = new SqlCommand("INSERT INTO airnode (DATETIME,AccGetOpTX, AccGetOpRX, AccSetOpTX,AccSetOpRX,AccUpdateOpTX,AccUpdateOpRX,AccDeleteOpTX,AccDeleteOpRX) VALUES (2011-02-03 00:18:00, '33', '28', '33', '28', '33', '28', '2', '345')");
cmd.ExecuteNonQuery();
con.Close();
}
} |
Partager