Click here to Skip to main content
15,846,976 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi I want a parameter that its content is null sending to the parameter in sql?????
example

SQL
declare @camera bit;declare @os bit;
set @camera=1;set @os=null;
select * from tproduct where camera=@camera OR (os=@os)


Response.Redirect("Finder.aspx?camera=1&os=");// problem
SQL
How much @os I put it null and send
Posted

set @camera=1;set @os=null;
You are setting @os to null in the SP.

SO no matter what you send via the web pages, you will be running against null in the query.
 
Share this answer
 
Just do as you are doing and read the value of os on Finder.aspx page.
You will find that as blank/null. So, send accordingly.

No need to pass null in parameter,
 
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