Click here to Skip to main content
15,891,204 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends. i have an stored procedure in sql server that has a where clause. in its where clause i have a bit value that i want to set its value to null. if i set it to dbnull.value i face with an error. what can i do?
Posted

Nice MSDN reference is available at http://msdn.microsoft.com/en-us/library/ms172138.aspx[^]
 
Share this answer
 
Hi ,
You can make your procedure has default value of null

SQL
CREATE PROCEDURE usp_ProcName 
(
 @param1 bit =NULL 
 )
AS
BEGIN 
--Proc body

END 

Best Regards
M.Mitwalli
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900