SqlConnection con = new SqlConnection(str); con.Open(); SqlCommand cmd = new SqlCommand("insert into EmpTable(TagID,Firstname,Lastname,Title) values (@TagID,@Firstname,@Lastname,@Title)", con); // cmd.Parameters.AddWithValue("@EmpID", txtempid.Text); cmd.Parameters.AddWithValue("@TagID", txttagid.Text); cmd.Parameters.AddWithValue("@Firstname", txtfirstname.Text); cmd.Parameters.AddWithValue("@Lastname", txtlastname.Text); cmd.Parameters.AddWithValue("@Title", txttitle.Text); cmd.ExecuteNonQuery(); MessageBox.Show("Data Saved."); con.Close();
paramter
value
cmd.CommandText = "insert into sample(RFID) values (@RFID)"; cmd.Parameters.AddWithValue("@RFID", yourRFIDValue); // add this line
cmd.CommandType = CommandType.Text;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)