Introduce DataBase,Asp.net,JavaScript,Xml,Html,Css,Sql,Php,ASP.NET Controls,AJAX,Tools,HTML,CSS,JavaScript,Open Source Project,WPF,.Net Framework,Linq
Top Recommended Hosting

is it possible to use the IN comparison operator with dataview.ro...

by the3factory 4/25/2008 10:57:00 PM
ADO.NET Data Providers is it possible to use the IN comparison operator with dataview.ro...
Question:

i require to filter the rows in dataset using DataView.Rowfilter for multiple values in same column.

please any one can help me.

 

thanks.




smr
Answer1:

Hi,

The following example shows multiple conditions in filter,

 

Code SnippetAnswer2:

thanks,

 

finally myself i solved the problem.

 

// for variable vallues

DataView.RowFilter = "CustId IN ( "+ sb.ToString() +")";   

here 'sb' is stringBuilder, it have multiple values seperated by commas.

 

  or

 

// for constant values

DataView.RowFilter="CustId IN ( 10,20,30)";

 

NOTE : All the values are from same column.




smr
Answer3:
Examples

Related posts

Sign up for PayPal and start accepting credit card payments instantly.


Powered by BlogEngine.NET 1.2.0.0