Reply to Re: query in dataview.rowfilter

Your name:

Reply:


Posted by Erland Sommarskog on 06/05/05 00:01

[posted and mailed]

vbnetrookie (bigjmt@hotmail.com) writes:
> In the dataview rowfilter property, how can I say that I just want
> Titles that start with 'A' to 'J' ??
>
> ex:
> dv.rowfilter = " Country = ' France ' "
>
> I want
> dv.rowfilter = " Title = (from 'A' to 'J') "
>
> This doesn't work :
> dv.rowfilter = " Title like '[a-j]%' "
>
> Neither does :
> dv.rowfilter = " Title like 'a%'" AND "Title like 'b%'" AND..so on
>
> But this does work just for the Titles starting with 'a'
> dv.rowfilter = " Title like 'a%' "

Assume that this is really SQL passed to SQL Server, my bets goes to:

dv.rowfilter = " Title like '[ABCDEFGHIJ]%' "

But I believe you are in the wrong newsgroup. It looks to me that
you are using a row filter on the DataView object, and they have their
own syntax. As I can read out from the book I have on ADO .Net, it does
not seem that you can use [] as wildcards in a row filter. In such case
you would have to use:

dv.rowfilter = " Title like 'a%'" OR "Title like 'b%'" OR..so on

To get real certainty, you should frequent
microsoft.public.dotnet.framework.adonet.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация