public SQLiteCommand(string commandText, SQLiteConnection connection, SQLiteTransaction transaction)
		{
			CommandText = commandText;
			DbConnection = connection;
			DbTransaction = transaction;
			m_parameterCollection = new SQLiteParameterCollection();
		}
Пример #2
0
        /// <summary>
        /// Initializes a command with the given SQL, connection and transaction
        /// </summary>
        /// <param name="commandText">The SQL command text</param>
        /// <param name="connection">The connection to associate with the command</param>
        /// <param name="transaction">The transaction the command should be associated with</param>
        public SQLiteCommand(string commandText, SQLiteConnection connection, SQLiteTransaction transaction)
        {
            _commandTimeout      = 30;
            _parameterCollection = new SQLiteParameterCollection(this);
            _designTimeVisible   = true;
            _updateRowSource     = UpdateRowSource.None;

            if (commandText != null)
            {
                CommandText = commandText;
            }

            if (connection != null)
            {
                DbConnection    = connection;
                _commandTimeout = connection.DefaultTimeout;
            }

            if (transaction != null)
            {
                Transaction = transaction;
            }

            SQLiteConnection.OnChanged(connection, new ConnectionEventArgs(
                                           SQLiteConnectionEventType.NewCommand, null, transaction, this,
                                           null, null, null, null));
        }
Пример #3
0
        /// <summary>
        /// Initializes a command with the given SQL, connection and transaction
        /// </summary>
        /// <param name="commandText">The SQL command text</param>
        /// <param name="connection">The connection to associate with the command</param>
        /// <param name="transaction">The transaction the command should be associated with</param>
        public SQLiteCommand(string commandText, SQLiteConnection connection, SQLiteTransaction transaction)
        {
            _statementList       = null;
            _activeReader        = null;
            _commandTimeout      = 30;
            _parameterCollection = new SQLiteParameterCollection(this);
            _designTimeVisible   = true;
            _updateRowSource     = UpdateRowSource.FirstReturnedRecord;
            _transaction         = null;

            if (commandText != null)
            {
                CommandText = commandText;
            }

            if (connection != null)
            {
                DbConnection = connection;
            }

            if (transaction != null)
            {
                Transaction = transaction;
            }
        }
 public SQLiteCommand(string commandText, SQLiteConnection connection, SQLiteTransaction transaction)
 {
     CommandText           = commandText;
     DbConnection          = connection;
     DbTransaction         = transaction;
     m_parameterCollection = new SQLiteParameterCollection();
 }
 protected void AsetaOsoitteenArvot(SQLiteParameterCollection parameters)
 {
     parameters.AddWithValue("$lahiosoite", Lahiosoite);
     parameters.AddWithValue("$postitoimipaikka", Postitoimipaikka);
     parameters.AddWithValue("$postinro", Postinumero);
     parameters.AddWithValue("$email", Email);
     parameters.AddWithValue("$puhelinnro", Puhelinnumero);
 }
Пример #6
0
        /// <summary>
        /// AddRangeW with value
        /// </summary>
        /// <param name="conn"></param>
        /// <param name="values"></param>
        public static void AddRangeWithValue(this SQLiteParameterCollection conn, Dictionary <string, object> values)
        {
            conn.CheckNull(nameof(conn));

#if NETFRAMEWORK || NETSTANDARD2_0
            foreach (var pair in values)
            {
                var key   = pair.Key;
                var value = pair.Value;
#else
            foreach (var(key, value) in values)
            {
#endif
                conn.AddWithValue(key, value);
            }
        }
    }
Пример #7
0
        /// <summary>
        /// Initializes a command with the given SQL, connection and transaction
        /// </summary>
        /// <param name="commandText">The SQL command text</param>
        /// <param name="connection">The connection to associate with the command</param>
        /// <param name="transaction">The transaction the command should be associated with</param>
        public SQLiteCommand(string commandText, SQLiteConnection connection, SQLiteTransaction transaction)
        {
            _commandTimeout      = 30;
            _parameterCollection = new SQLiteParameterCollection(this);
            _designTimeVisible   = true;
            _updateRowSource     = UpdateRowSource.None;

            if (commandText != null)
            {
                CommandText = commandText;
            }

            if (connection != null)
            {
                DbConnection    = connection;
                _commandTimeout = connection.DefaultTimeout;
            }

            if (transaction != null)
            {
                Transaction = transaction;
            }
        }
Пример #8
0
 public SQLiteCommand(string commandText, SQLiteConnection connection, SQLiteTransaction transaction)
 {
     this._statementList       = null;
     this._activeReader        = null;
     this._commandTimeout      = 30;
     this._parameterCollection = new SQLiteParameterCollection(this);
     this._designTimeVisible   = true;
     this._updateRowSource     = UpdateRowSource.None;
     this._transaction         = null;
     if (commandText != null)
     {
         this.CommandText = commandText;
     }
     if (connection != null)
     {
         this.DbConnection    = connection;
         this._commandTimeout = connection.DefaultTimeout;
     }
     if (transaction != null)
     {
         this.Transaction = transaction;
     }
 }
Пример #9
0
    /// <summary>
    /// Initializes a command with the given SQL, connection and transaction
    /// </summary>
    /// <param name="commandText">The SQL command text</param>
    /// <param name="connection">The connection to associate with the command</param>
    /// <param name="transaction">The transaction the command should be associated with</param>
    public SQLiteCommand(string commandText, SQLiteConnection connection, SQLiteTransaction transaction)
    {
      _statementList = null;
      _activeReader = null;
      _commandTimeout = 30;
      _parameterCollection = new SQLiteParameterCollection(this);
      _designTimeVisible = true;
      _updateRowSource = UpdateRowSource.FirstReturnedRecord;
      _transaction = null;

      if (commandText != null)
        CommandText = commandText;

      if (connection != null)
        DbConnection = connection;

      if (transaction != null)
        Transaction = transaction;
    }
    /// <summary>
    /// Initializes a command with the given SQL, connection and transaction
    /// </summary>
    /// <param name="commandText">The SQL command text</param>
    /// <param name="connection">The connection to associate with the command</param>
    /// <param name="transaction">The transaction the command should be associated with</param>
    public SQLiteCommand(string commandText, SQLiteConnection connection, SQLiteTransaction transaction)
    {
      _commandTimeout = 30;
      _parameterCollection = new SQLiteParameterCollection(this);
      _designTimeVisible = true;
      _updateRowSource = UpdateRowSource.None;

      if (commandText != null)
        CommandText = commandText;

      if (connection != null)
      {
        DbConnection = connection;
        _commandTimeout = connection.DefaultTimeout;
      }

      if (transaction != null)
        Transaction = transaction;

      SQLiteConnection.OnChanged(connection, new ConnectionEventArgs(
          SQLiteConnectionEventType.NewCommand, null, transaction, this,
          null, null, null, null));
    }
Пример #11
0
    /// <summary>
    /// Initializes a command with the given SQL, connection and transaction
    /// </summary>
    /// <param name="commandText">The SQL command text</param>
    /// <param name="connection">The connection to associate with the command</param>
    /// <param name="transaction">The transaction the command should be associated with</param>
    public SQLiteCommand(string commandText, SQLiteConnection connection, SQLiteTransaction transaction)
    {
      _commandTimeout = 30;
      _parameterCollection = new SQLiteParameterCollection(this);
      _designTimeVisible = true;
      _updateRowSource = UpdateRowSource.None;

      if (commandText != null)
        CommandText = commandText;

      if (connection != null)
      {
        DbConnection = connection;
        _commandTimeout = connection.DefaultTimeout;
      }

      if (transaction != null)
        Transaction = transaction;
    }