Stored Procedures, passing NULLS..

Posts   
 
    
Coolcoder
User
Posts: 37
Joined: 22-Sep-2005
# Posted on: 22-Sep-2005 12:40:49   

I have a stored proc which is used to perform a search - so some parameters get passed in that may or may not be NULL. How do I call this stored proc , specifying the nulls??

e.g.

Retrievalprocedures.Dosearch (System.DBNUll.Value, System.DBNULL.Value) - doesn't seem to work...

In the proc my where clause basically checks for nulls and replaces with its value e.g...

WHERE Postcode = ISNULL(@postcode, Postcode)

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 22-Sep-2005 13:49:29   
Frans Bouma | Lead developer LLBLGen Pro