String connectionstring = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" + txtboxfilename.Text + "';Persist Security Info=False;"; string SqlString = "Update DTR_Table Set Date = ?, Time = ?, Type = ?, Remarks = ? where Employee = @Employee"; using (OleDbConnection conn = new OleDbConnection(connectionstring)) { using (OleDbCommand cmd = new OleDbCommand(SqlString, conn)) { conn.Open(); cmd.CommandType = CommandType.Text; cmd.Parameters.AddWithValue("@Employee", txtboxId.Text); cmd.Parameters.AddWithValue("Date", DatePicker1.Text); cmd.Parameters.AddWithValue("Time", TimePicker1.Text); cmd.Parameters.AddWithValue("Type", combotype.Text); cmd.Parameters.AddWithValue("Remarks", txtboxremarks.Text); cmd.ExecuteNonQuery(); conn.Close(); } }
Parameters
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)