Exemplo n.º 1
0
 internal static void SetAutoCommit(DbConnection con, bool autoCommit)
 {
     using (var command = new DbCommandFactory(con, "set autocommit=" + (autoCommit == true ? "1" : "0")).Create())
     {
         command.ExecuteNonQuery();
     }
 }
Exemplo n.º 2
0
 internal static void Commit(DbConnection con)
 {
     using (var command = new DbCommandFactory(con, "commit").Create())
     {
         command.ExecuteNonQuery();
     }
 }
Exemplo n.º 3
0
        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
            }
        }