DataTable.Select filterexpression

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kevin Attard

    DataTable.Select filterexpression

    Hi

    Is it possible to use multiple conditions in the filterexpressio n of the
    DataTable's Select method?

    eg:
    ds.Tables["TableName"].Select("Type = 1 AND Name = "Joseph");


  • Chris Fulstow

    #2
    Re: DataTable.Selec t filterexpressio n

    Yes, the same rules apply as DataColumn.Expr ession:

    "Concatenat ion is allowed using Boolean AND, OR, and NOT operators. You
    can use parentheses to group clauses and force precedence. The AND
    operator has precedence over other operators."

    Gets or sets the expression used to filter rows, calculate the values in a column, or create an aggregate column.



    Kevin Attard wrote:
    Hi
    >
    Is it possible to use multiple conditions in the filterexpressio n of the
    DataTable's Select method?
    >
    eg:
    ds.Tables["TableName"].Select("Type = 1 AND Name = "Joseph");

    Comment

    • Kevin Attard

      #3
      Re: DataTable.Selec t filterexpressio n

      Thanks a lot Chris

      "Chris Fulstow" <chrisfulstow@h otmail.comwrote in message
      news:1160737330 .669809.255500@ m7g2000cwm.goog legroups.com...
      Yes, the same rules apply as DataColumn.Expr ession:
      >
      "Concatenat ion is allowed using Boolean AND, OR, and NOT operators. You
      can use parentheses to group clauses and force precedence. The AND
      operator has precedence over other operators."
      >
      Gets or sets the expression used to filter rows, calculate the values in a column, or create an aggregate column.

      >
      >
      Kevin Attard wrote:
      >Hi
      >>
      >Is it possible to use multiple conditions in the filterexpressio n of the
      >DataTable's Select method?
      >>
      >eg:
      >ds.Tables["TableName"].Select("Type = 1 AND Name = "Joseph");
      >

      Comment

      Working...