Click here to Skip to main content
15,899,679 members

Comments by Abdul Samad KP (Top 78 by date)

Abdul Samad KP 19-Jun-16 7:32am View    
In the dropdown 'G' is capital letter <asp:ListItem Text="Gas" Value="Gas">
and you are comparing it with "gas", which will never return true
Abdul Samad KP 12-Oct-15 8:58am View    
remove 'SET @DCNo ='+Cast(@dc as VARCHAR)+';
and change
from Vw_InOutWard where DCNo=@dc) src

to

from Vw_InOutWard where DCNo=''' + @dc + ''') src

Beware of SQL injection, sanitise your textbox text before passing to the SP
Abdul Samad KP 12-Oct-15 7:45am View    
Pls post full code
Abdul Samad KP 12-Oct-15 7:45am View    
Deleted
Pls post full code
Abdul Samad KP 12-Oct-15 4:22am View    
You need to pass the @DCNo from frontend, ie your textbox value, and if it is not a integer then change set @query = 'DECLARE @DCNo INT;
to set @query = 'DECLARE @DCNo varchar;

By the way I assume , you put all this query in a stored procedure