Tuesday, June 9, 2009

Ucase in DataTable.Select(

Ucase in DataTable.Select(

If you want to apply a filter condition on base of upper cases like what we do in sql server as ucase(columnname)=<UPPERCASE VALUE> .

In ADO.NET - Just make it
 datatable.CaseSensitive = false;  

syntax:

 dtCopy.CaseSensitive = false;  
 DataRow[] drFilter = dtCopy.Select("Source_Dir=’/LOCAL/HOME’”);  
 dtCopy.CaseSensitive = true;  

No comments:

Post a Comment

Code Formater

Paste Here Your Source Code
Source Code Formatting Options
1) Convert Tab into Space :
2) Need Line Code Numbering :
3) Remove blank lines :
4) Embeded styles / Stylesheet :
5) Code Block Width :
6) Code Block Height :
7) Alternative Background :
Copy Formatted Source Code
 
Preview Of Formatted Code