473,320 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

DataTable.Select filterexpression

Hi

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

eg:
ds.Tables["TableName"].Select("Type = 1 AND Name = "Joseph");
Oct 13 '06 #1
2 17803
Yes, the same rules apply as DataColumn.Expression:

"Concatenation 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."

http://msdn2.microsoft.com/en-us/lib...xpression.aspx
Kevin Attard wrote:
Hi

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

eg:
ds.Tables["TableName"].Select("Type = 1 AND Name = "Joseph");
Oct 13 '06 #2
Thanks a lot Chris

"Chris Fulstow" <ch**********@hotmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
Yes, the same rules apply as DataColumn.Expression:

"Concatenation 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."

http://msdn2.microsoft.com/en-us/lib...xpression.aspx
Kevin Attard wrote:
>Hi

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

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

Oct 13 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: randy | last post by:
Hello all, I have a DataTable which I am building column by column and adding rows after each new column. The DataTable columns match the columns in my database table. I'm building the...
5
by: Stefan Turalski \(stic\) | last post by:
Hi, I'm wondering if there is a way to send a method parametrs by ref when DataTabel is a type of this value ? I done some sort of select over DataTable columns, just by removing them froma...
2
by: JohnR | last post by:
Sorry if this is has an obvious answer, but I can't find it... I am using a datatable.select to obtain the rows in a datatable that meet certain criteria. My question is this: for each of the...
7
by: wk6pack | last post by:
Hi, How do I check datatable.select(filter) in the following: for each dtrow in datatable.select(filter) .... next I've also tried:
2
by: DummyDumb | last post by:
Hi, I've got a Gridview utilizing a filterexpression: <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OnDeleted="ItemDeleted" EnableCaching="true"...
0
by: wubin_98 | last post by:
When I set a SqlDataSource1.FilterExpression value to " Partnumber LIKE '87-2055-___'" , SqlDataSource return empty. But I can get correct result in SQL query by including above expression. I...
1
by: j.gibson | last post by:
VS 2005 C# ASP.NET I have a Gridview which is filled from an objectdatasource. I have some filtering - which works perfectly when the field to be filtered is an INT. ...
1
by: Maxwell2006 | last post by:
Hi, I am working with strongly typed datatables. What is the most efficient way to build a new DataTAble based on the result of DataTable.Select? At this point I use a foreach loop to do the...
6
by: fniles | last post by:
I am using VB.NET 2005 and Access database. My program uses a timer that kicks in every 1 min to read from a database and copy the dataset table to a datatable. This database is in a class called...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.