Matt Speller

Matt Speller

  • NA
  • 14
  • 0

Dataview filters.

Oct 17 2005 4:13 AM
Hi guys,

I have a dataview that contains 1000's of rows, I want to be able to filter on these rows, on two columns in the dataview. I am setting the rowfilter to something like "col1 = 'something' and col2 = 'something2'".

But I have the need to filter on maybe 700 items, so the filter string takes the form "(col1 = 'something' and col2 = 'something2') or (col1 = 'something3' and col2 = 'something4')". Times this by 700 rows, and apply this filter to a dataview and I get a stack overflow exception (Which not not a surprise when the filterstring takes up 1314 lines in Word... ). What is the limit to the length of a rowfilter in a dataview? Also, any ideas how I can compact this rowfilter. Or is "(col1 & col 2) or (col1 & col 2) ..." the best format for this.

The only soultion I can see - is doing the work on a database and refreshing the datasource from this query - something I really do not want to do as the application is working with a snapshot of data - not real time.

Cheers!!!!!!