dotConnect for PostgreSQL Documentation
Devart.Data.PostgreSql Namespace / PgSqlParameterCollection Class
Members Example

In This Topic
    PgSqlParameterCollection Class
    In This Topic
    Collects all parameters relevant to a PgSqlCommand as well as their respective mappings to System.Data.DataSet columns.
    Syntax
    Remarks
    The number of parameters in the collection must be equal to the number of parameter placeholders within the command text, or PostgreSQL raises an error.
    Example
    The following example adds instance of PgSqlParameter to collection.
    public void AddPgSqlParameters()
    {
      // Create pgConnection and pgCommand.
    
      pgCommand.CommandText = "DELETE Test.Dept WHERE DeptNo = :DeptNo";
      pgCommand.Parameters.Add("DeptNo", PgSqlType.Int).Value = 50;
      pgCommand.ExecuteNonQuery();
    }
    Public Sub AddPgSqlParameters()
      // Create pgConnection and pgCommand.
    
      pgCommand.CommandText = "DELETE Test.Dept WHERE DeptNo = :DeptNo"
      pgCommand.Parameters.Add("DeptNo", PgSqlType.Int).Value = 50
      pgCommand.ExecuteNonQuery()
    
    End Sub 'AddPgSqlParameters
    Inheritance Hierarchy

    System.Object
       System.MarshalByRefObject
          System.Data.Common.DbParameterCollection
             Devart.Common.DbParameterBaseCollection
                Devart.Data.PostgreSql.PgSqlParameterCollection

    See Also