Re: RowFilter and stackoverflow

From: Jay B. Harlow [MVP - Outlook] (Jay_Harlow_MVP_at_msn.com)
Date: 08/22/04


Date: Sun, 22 Aug 2004 11:18:45 -0500

Gene,
It sounds like either a badly formed expression or too complex an
expression.

Although I don't know if the limits of the Expression is documented, I have
seen limits. One way to avoid these limits is to pick a "Better" operator.

For example, use the In operator instead of = if you are comparing a single
field to a list of values.

Use:

    Dim view As DataView
    view.RowFilter = "FirstName In ('Jay', 'Cor', 'Herfried', 'Gene')

Instead of:

    Dim view As DataView
    view.RowFilter = "FirstName = 'Jay' Or FirstName = 'Cor' Or FirstName =
'Herfried' Or FirstName = 'Gene')

Of course if you want to match both names, then this may not work as well. I
would consider letting your database do the selection in this case.

For information on expressions, such as DataView.RowFilter, in the DataSet
object model see the DataColumn.Expression help topic.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatadatacolumnclassexpressiontopic.asp

Hope this helps
Jay

Hope this helps
Jay

"Gene Ariani" <karadur@comcast.net> wrote in message
news:kJGdndBwQfp5v7XcRVn-jw@comcast.com...
> Thanks everyone for the reply.
>
> What I am doing is for example trying to filter a dataset for certain
first
> name and last names.
>
> So I create a dataview and filter the dataview
>
> When I filter for forty combination it works perfectly but when It gets to
> hundreds I get an error.
>
>
>
>
>
> "Cor Ligthert" <notfirstname@planet.nl> wrote in message
> news:OUwe0f0hEHA.596@TK2MSFTNGP11.phx.gbl...
> > Correction, I see what you mean now, you make a rowfilter like this.
> >
> > Dim myrowfilter as string = "Name = 'Jan' Or "
> > For myname as string in mytable
> > string = string '" & mylname & "'"
> > next
> > 'remove the last Or
> >
> > When it is this and blows up your program because a stack overflow I
would
> > not even look how big the stack could be however take another approach.
> >
> > However just my opinion.
> >
> > Cor
> >
> >
>
>



Relevant Pages

  • Re: 24 bit ADC testing
    ... >sure there is limits like you mention, but wouldnt the same errors aply just ... >as much to a sinewave generator too if not more so? ... >reduce their voltage dependant capacitance efect, thermal drift would be not ... high-Q filter, you don't have much of a filter any more. ...
    (sci.electronics.basics)
  • Re: stability of time-varying biquad
    ... Imposing limits on the amount of varying is able to ... Time-varying or not the poles must lie there for it to be stable. ... yet the filter blows up (if the modulation ... could impose a limit of the rate or speed or amount of the change. ...
    (comp.dsp)
  • Media Limits Between Filters
    ... Are there any limits to resolution that I need to worry about if I were to ... change the dimensions for the output pin of my filter to something different ... I'm currently inputting 720 X 480 frame size into the transform filter and want ...
    (microsoft.public.win32.programmer.directx.video)
  • Filter with large number of criteria
    ... This may be a duplicate post; my appologies if it is. ... How can I filter a project with around 60 criteria. ... limits me to 40 entries. ...
    (microsoft.public.project)
  • Re: Current Directory Structure (CDS) limitations
    ... || internal stack overflow" at the 16th level. ... | not be accessed at all, if I booted to plain 4DOS, without Windows. ... I tried with LFN support both on and off. ... | limits, and enabling LFN support does not remove some of those ...
    (comp.os.msdos.4dos)