Subject | Null parameter |
---|---|
Author | Robert martin |
Post date | 2008-07-04T01:38:18Z |
Hi
I have a TIBOQuery with an SQL like
SELECT *
FROM MyStoredproc(:ItemRef)
Where I pass in a reference (Query.ParamByName('ItemRef').AsInteger :=
234) an a result is returned. Works great.
However the stored procedure is designed so that if a NULL is passed in
totals for all items are returned. In SQL I just write in NULL. how do
I achieve this in code (without changing the SQL for the Query and
having to reprepare etc)?
Im sure this is simple :)
--
Rob Martin
Software Engineer
phone +64 03 377 0495
fax +64 03 377 0496
web www.chreos.com
Wild Software Ltd
I have a TIBOQuery with an SQL like
SELECT *
FROM MyStoredproc(:ItemRef)
Where I pass in a reference (Query.ParamByName('ItemRef').AsInteger :=
234) an a result is returned. Works great.
However the stored procedure is designed so that if a NULL is passed in
totals for all items are returned. In SQL I just write in NULL. how do
I achieve this in code (without changing the SQL for the Query and
having to reprepare etc)?
Im sure this is simple :)
--
Rob Martin
Software Engineer
phone +64 03 377 0495
fax +64 03 377 0496
web www.chreos.com
Wild Software Ltd