Posted on: 7/4/2015 1:33:13 PM | Views : 743

hi,
 
I am looping through a checkboxlist that contains string values.
I need to pass the values as a parameter to the sql query that I have in my DAL.
 
The query doesn't return any results. In the profiler i see that the output is as below. Seems like there is a problem with the apostrophes in @finalscore.
 
How can i correct this?
 
thanks
 
 sql output
exec sp_executesql N'SELECT G.* FROM FUNDS G
WHERE ModelID=@ModelID AND finalscore IN (@finalscore) ',N'@ModelID nvarchar(3),@finalscore nvarchar(7)',@ModelID=N'COL',@finalscore =N'''B'',''C'''
 
   
 
dal class ...

Go to the complete details ...