Re: Missing parameter for data adapter select by Jack
Jack
Sun Jul 06 01:58:44 CDT 2008
Why would that matter? Supply the same value for both parameters.
On Sat, 5 Jul 2008 18:50:18 +0100, "John" <info@nospam.infovis.co.uk>
wrote:
>Does not work as both ? become two separate parameters.
>
>Thanks
>
>Regards
>
>"Jack Jackson" <jjackson@cinnovations.net> wrote in message
>news:382u64599ju6vavsugq5id9s932oncdtn2@4ax.com...
>> On Fri, 4 Jul 2008 02:02:57 +0100, "John" <info@nospam.infovis.co.uk>
>> wrote:
>>
>>>Hi
>>>
>>>I am using below in my dataadapter SELECT statement;
>>>
>>>SELECT <field list>
>>>FROM Clients
>>>WHERE (Status = ?)
>>>ORDER BY ID
>>>
>>>What if I need all clients regardless of status, is there a way to modify
>>>the above statement to include this situation or is a second query needed
>>>for that?
>>>
>>>Thanks
>>>
>>>Regards
>>>
>>
>> You could try:
>> SELECT ... FROM ... WHERE ? IS NULL OR Status = ? ORDER BY ...
>>
>> and pass in NULL for the parameter to get all records. I assume you
>> are using OLEDB, and I don't know it if allows a parameter to be
>> tested like that.
>