Hi,
I would like to create a Datasource like this "SELECT field FROM table WHERE field = 'cond' @ParamSupp ORDER BY field
In this example, I want to set a empty default value to @ParamSupp to have this => SELECT field FROM table WHERE field = 'cond' ORDER BY field
And in my code, sometimes I would add some parameters to my request. For example, assign "AND field2 = 'cond2 AND field3='cond3'" to have a datasource like this => SELECT field FROM table WHERE field = 'cond' AND field2 = 'cond2 AND field3='cond3' ORDER BY field
Is it possible ? I try different solution like : AND @param with default value '1 = 1', but it doesn't work anymore. So I rewrite entire sql request to this DS at this time. It works fine but my request is in double (in aspx and in code behind), and if I could, I would avoid this.
Thanks in advance.
Greg
I would like to create a Datasource like this "SELECT field FROM table WHERE field = 'cond' @ParamSupp ORDER BY field
In this example, I want to set a empty default value to @ParamSupp to have this => SELECT field FROM table WHERE field = 'cond' ORDER BY field
And in my code, sometimes I would add some parameters to my request. For example, assign "AND field2 = 'cond2 AND field3='cond3'" to have a datasource like this => SELECT field FROM table WHERE field = 'cond' AND field2 = 'cond2 AND field3='cond3' ORDER BY field
Is it possible ? I try different solution like : AND @param with default value '1 = 1', but it doesn't work anymore. So I rewrite entire sql request to this DS at this time. It works fine but my request is in double (in aspx and in code behind), and if I could, I would avoid this.
Thanks in advance.
Greg