I know this question was asked many times, but i am not able to find a solution for it
This is my code
string query = @"SELECT *
FROM SMSMessage
WHERE (respondCode IS @respondCode)
and (sentOn > '08/26/2016')
";
//string query = "select * from SMSMessage";
SqlConnection con = new SqlConnection(Utilities.getConnectionString());
SqlCommand cmd = new SqlCommand(query, con);
cmd.Parameters.AddWithValue("@respondCode", DBNull.Value);
I want the responseCode to be null,
I am getting error:
syntax error near @responseCode
when I do this responseCode is NULL, there is no syntax error, but the query for some reaonse doesn't bring any result
Help please