internal static void SetAutoCommit(DbConnection con, bool autoCommit) { using (var command = new DbCommandFactory(con, "set autocommit=" + (autoCommit == true ? "1" : "0")).Create()) { command.ExecuteNonQuery(); } }
internal static void Commit(DbConnection con) { using (var command = new DbCommandFactory(con, "commit").Create()) { command.ExecuteNonQuery(); } }
internal static void Commit(DbConnection con) { try { using (var command = new DbCommandFactory(con, "commit").Create()) { command.ExecuteNonQuery(); Terminal.MainTerminal.AppendText("commit;"); } } catch (DbException ex) { Terminal.MainTerminal.AppendText(ex.Message); #if DEBUG Console.WriteLine(ex.Message); #endif } }