SqlConnection sqlconn = new SqlConnection("Data Source=AAN-PC;Initial Catalog=friday;Integrated Security=True"); SqlDataAdapter sa = new SqlDataAdapter(); string query = "insert into Table_1(SensorID,SensorValue,Time) values(@AB, @SV, @TM)"; sa.InsertCommand = new SqlCommand(query, sqlconn); sa.InsertCommand.Parameters.AddWithValue("@AB", id); sa.InsertCommand.Parameters.AddWithValue("@SV", hexValue); sa.InsertCommand.Parameters.AddWithValue("@TM", DateTime.Now.ToString("HH:mm:ss"));
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)