コード例 #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
        public IDbTransaction BeginTransaction()
#endif
        {
            if (state != ConnectionState.Open)
            {
                throw new InvalidOperationException("Invalid operation: The connection is closed");
            }

            SqliteTransaction t = new SqliteTransaction();

#if NET_2_0
            t.SetConnection(this);
#else
            t.Connection = this;
#endif
            SqliteCommand cmd = (SqliteCommand)this.CreateCommand();
            cmd.CommandText = "BEGIN";
            cmd.ExecuteNonQuery();
            return(t);
        }
コード例 #3
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;
		}
コード例 #4
0
ファイル: SqliteConnection.cs プロジェクト: Belxjander/Asuna
			public IDbTransaction BeginTransaction ()
#endif
		{
			if (state != ConnectionState.Open)
				throw new InvalidOperationException("Invalid operation: The connection is closed");
			
			SqliteTransaction t = new SqliteTransaction();
#if NET_2_0
			t.SetConnection (this);
#else
			t.Connection = this;
#endif
			SqliteCommand cmd = (SqliteCommand)this.CreateCommand();
			cmd.CommandText = "BEGIN";
			cmd.ExecuteNonQuery();
			return t;
		}