RE: dataset filter question

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Bill Borg (BillBorg_at_discussions.microsoft.com)
Date: 10/13/04


Date: Wed, 13 Oct 2004 12:47:01 -0700

Set the rowfilter only one time, using OR to separate your values, e.g.
defaultview.rowfilter = "carmake='chevy' or carmake='ford'"

As written, I presume it only works for the last one in the list.

Bill

"Mike" wrote:

> I'm trying to filter a dataset on items that are being passed in via a
> querystring.
>
> the string looks like this.
> chevy|ford|BMW|
>
> on the information page i split the string such as
> selCars.split("|")
>
> and i want to filter the dataset based on the string so i do this
> dataview.rowfilter ="carmake=" & "'" cars & "'"
> datalist.datasource = dv
> datalist.databind
>
> now my question is how can i populate and display the datalist for
> everything coming in via the querystring and split them correctly at the |?
> If I only pass 1 item in such as BMW without the | it works fine, but if i
> pass more then 1 and split using | it doesn't work.
>
> my code snippet
> for i = 0 to CarArray.Length
> dataview.rowfilter ="carmake=" & "'" cars & "'"
> next
> datalist.datasource = dataview
> datalist.databind
>
> i need a table for each item being passed in
>
>



Relevant Pages

  • Re: SQL help required
    ... That is the shotgun approach you are taking. ... separate out the elements on the form rather than take the generic approach. ... Can someone tell me how I can format the SELECT string below so that it ... returns rows where there is a part match with the @querystring value? ...
    (microsoft.public.vstudio.development)
  • Re: Still in while loop hell, Now with refined question!
    ... Besides all the advice on how to get a line in to your program, you have a separate problem of how to do the loop, and how to stop it. ... public String retrieveLine() ... Now you need to have an addmethod in NodeWorker. ... This is where you use that one part of your original program where you manipulate head and prev. ...
    (comp.lang.java.programmer)
  • Re: Extract data from String
    ... I need to split this data out into separate columns. ... a random length depending on the data in it. ... string as it is, the following one shows how it should be split up into ... The same functions can be run from within VBA using the RUN ...
    (microsoft.public.excel.programming)
  • Re: asp question about post vars
    ... Consider encrypting the querystring if application requirements force ... Don't use Session. ... //Creating public properties that get private fields ... string lastName = myPage1.lastName; ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: A deployed web aspx page does not display response over the intern
    ... writing exception information to the ... public string shortcode ... string responseString = null; ... NameValueCollection queryString = ...
    (microsoft.public.dotnet.languages.csharp)