dataview rowfilter doent work

  • Thread starter Thread starter karthey
  • Start date Start date
K

karthey

Hi,

I have set the data row filter as "(eff_date <= '#3/19/2007 8:25:00
AM#' AND ('#3/19/2007 8:25:00 AM#' <= term_date OR term_date IS
NULL))".

The filter works some time and doen't work most of the time for
term_date.

what can I do to make to work?

Thanks
Cathy
 
I am not sure if that datetime <= compare seems right to me. I don't have a
code or MSDN access to chk right now. But why the # in it?

VJ
 
Hi,

I have set the data row filter as "(eff_date <= '#3/19/2007 8:25:00
AM#' AND ('#3/19/2007 8:25:00 AM#' <= term_date OR term_date IS
NULL))".

The filter works some time and doen't work most of the time for
term_date.

what can I do to make to work?

Thanks
Cathy
 
I am not sure if that datetime <= compare seems right to me. I don't have a
code or MSDN access to chk right now. But why the # in it?

VJ










- Show quoted text -

Looks like the syntax is OK.

First time the dataview loads normal with the datafilter. If I change
the date in my app and load the dataview again, then the filter
condition takes 3 min.
What would be wrong?

Thanks for the quick response.
Cathy
 
The #'s are used to mark dates in DataColumn.Expression syntax.

Just something to consider. Exactly what kind of thing is term_Date?
If it is some arbitrary datetime object, then it has a more accurarcy
that 8:25:00. When the values of term_date are set, are they truncated
to whole seconds? If not then checking for <= 8:25:00 would rule out
any datetime value that are fractional seconds larger than 8:25:00.

==================
Clay Burch
Syncfusion, Inc.
 
Cathy

That would depend on no of rows, and how the rows are searched given the
condition.. Indexing normally helps, but your case its a DataSet... so how
many rows are we talking.. you could also try below

(term_date is NULL OR term_date >= '#3/19/2007 8:25:00 AM#' ) and eff_date
<= '#3/19/2007 8:25:00 AM#'

I rearragned the condition.. so term_date is applied first and eff_date
later.. so if term_date is null more those rows get picked up quickly.. I
guess this you a idea!!

VJ
 
I did the changes to the filter condition as you said. Still doing
the same thing for the next cycles when it does the filter. Not sure
what is causing this problem. I have around 10,000 rows.

Thanks
Karthey
 
did u read Clay's suggestion?.. That possibly could also be a chance. Its
all how your filter is applied to rows you have. So its based on data. I
just gav a guidance of how to analyze the condition. Look at the data, aslo
see Clay's suggestion!!


VJ
 
THANKS a lot.
If I remove the time part in the filter its working fine.
Cathy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top