示例#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);
        }
示例#2
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;
		}