if (strDesiredPassword.Text == strDesiredPassword2.Text && String.IsNullOrWhiteSpace(strDesiredUser.Text) == false) { string insertCMD = "INSERT INTO LoginTable (User,Pass) VALUES (@User,@Pass)"; string ConnStr = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=G:\MedDesk\Login.accdb;"; using (OleDbConnection MyConn = new OleDbConnection(ConnStr)) { try {//insertCommand.Parameters.Add("Time", OleDbType.Char).Value = strTime; MyConn.Open(); OleDbCommand Cmd = new OleDbCommand(insertCMD, MyConn); Cmd.Parameters.Add("@User", OleDbType.Char).Value = strDesiredUser.Text; Cmd.Parameters.Add("@Pass", OleDbType.Char).Value = strDesiredPassword2.Text; Cmd.ExecuteNonQuery(); MyConn.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } }
string insertCMD = "INSERT INTO LoginTable ([User],Pass) VALUES (@User,@Pass)";
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)