Urgent: how to pass the conditions to simple & advanced query

Urgent: how to pass the conditions to simple & advanced query

  
we have more than one filters in the screen.for ex: search by company,date,status etc.So when i click the search button i have to create the condition string like
strCondition="Company='Test' and date>='' and date <='' and status=true etc.
Because i have combobox with value of >,<,>=,<= etc  so on getting value from each control i have to form the Condition string.
This strCondition will be pass to both simple and Advanced query to filter the data from sql.


So Please guide to pass the condition string to both  simple and Advanced query.

thanks,
Hi Devaraj,

I believe it's not really possible to "Expand inline" with a simple query.

However what you could do is pass the > / >= / < / <= value in a parameter to the simple query and use a machanism like this one to get the same result:

@CompareSign = ">" and date > @DateParameter
or
@CompareSign = "=>" and date => @DateParameter
or
@CompareSign = "<" and date < @DateParameter
or
@CompareSign = "<=" and date <= @DateParameter

I'm often using this kind of structure to be able to 'stay' with a simple query.
thank you,i will try based on your reply.