PC Review


Reply
Thread Tools Rate Thread

Dataview RowFilter Question

 
 
dmovva
Guest
Posts: n/a
 
      8th Aug 2005
Hi all,
I was trying to use RowFilter on a DataView object. I want to seach
all the titles starting with letters a,b,c. SQL quesry would be
something like this

select * from results where title like [a-c]%

My rowfilter is
dv.RowFilter = "Title like '[a-c]%'";
but this is not working. I tried other variations too like,

"Title like '[[]a[-]c[]][%]'";

can some one help me with this please


Thanks
D

 
Reply With Quote
 
 
 
 
dmovva
Guest
Posts: n/a
 
      8th Aug 2005
and I know the following would work but I don't want it that way

"Title like 'a%' or title like 'b%' or title like 'c%'";

 
Reply With Quote
 
Miha Markic [MVP C#]
Guest
Posts: n/a
 
      8th Aug 2005
Try OR-ing the conditions: title like 'a%' or title like ...

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
SLODUG - Slovene Developer Users Group www.codezone-si.info

"dmovva" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi all,
> I was trying to use RowFilter on a DataView object. I want to seach
> all the titles starting with letters a,b,c. SQL quesry would be
> something like this
>
> select * from results where title like [a-c]%
>
> My rowfilter is
> dv.RowFilter = "Title like '[a-c]%'";
> but this is not working. I tried other variations too like,
>
> "Title like '[[]a[-]c[]][%]'";
>
> can some one help me with this please
>
>
> Thanks
> D
>



 
Reply With Quote
 
Cor Ligthert [MVP]
Guest
Posts: n/a
 
      8th Aug 2005
Dmovva,

Have you tried to add an extra column with an expression to make the
condition easier?

Just an idea,

Cor


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataView.RowFilter question Eric Microsoft Dot NET 2 9th Apr 2006 04:37 PM
DataView.RowFilter question Eric Microsoft VB .NET 2 9th Apr 2006 04:37 PM
DataView.Rowfilter question KC Microsoft VB .NET 8 22nd Jul 2004 10:27 PM
dataview rowfilter question Mat Microsoft VB .NET 1 12th Jul 2004 07:51 PM
dataview.rowfilter question Tina Microsoft ADO .NET 1 12th Sep 2003 06:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:24 PM.