Re: Empty Parameter by Marina
Marina
Thu Mar 30 07:25:52 CST 2006
You would have to change your query.
You could also play tricks like always the where clause be like:
myColumn = @myParam Or 1 = @fakeParam
When you want to filter, you set @fakeParam to 2. When you don't, you set
it to 1, and all rows will be returned.
<milan.letic@gmail.com> wrote in message
news:1143721460.110382.150080@t31g2000cwb.googlegroups.com...
> Hello,
> I have sql command like: "Select... Where myColumn = @myParameter"
>
> Now, I can simply add parameter to the collection and filter data.
>
> What if I want to return not filtered data, I mean to skip, avoid
> executing this "myColumn = @myParameter"?!
>
> Is this possible, or I have to change select command every time I don't
> want filtered data?
>