Esempio n. 1
0
        protected override DbTransaction BeginDbTransaction(IsolationLevel il)
        {
            if (state != ConnectionState.Open)
            {
                throw new InvalidOperationException("Invalid operation: The connection is closed");
            }

            SqliteTransaction t = new SqliteTransaction();

            t.SetConnection(this);
            SqliteCommand cmd = (SqliteCommand)this.CreateCommand();

            cmd.CommandText = "BEGIN";
            cmd.ExecuteNonQuery();
            return(t);
        }
Esempio n. 2
0
 public SqliteCommand(string sqlText, SqliteConnection dbConn, SqliteTransaction trans)
 {
     sql         = sqlText;
     parent_conn = dbConn;
     transaction = trans;
 }