Hi
If you are trace your program you can see your
StringBuilder
output is a wrong because you have not blink between first
slq.AdppendLine
and second
sql.AppendLine
so your output is a:
SELECT * FROM BQ_ShoppingCartWHERE userID = @userID
Where clause is a wrong so you need a blink at the end of first sql.AppendLine how ever you don`t need to the
StringBuilder
for this purpose and I don`t know what you used it?
sql.AppendLine("SELECT * FROM BQ_ShoppingCart ");
sql.AppendLine("WHERE userID = @userID");
You have really easy way for making query string same as:
String sqlQuery = "SELECT * FROM BQ_ShoppingCart WHERE userID = @userID";
Best Regards.