I am using a not equal operator <> in my sql statement but it doesn't retrieve any record which is not equal to the selected date.
CODE:
Command = New SqlCommand("SELECT * FROM [Products] WHERE [ParkingStartDate] <> @StartDate", myConn)
Command.Parameters.AddWithValue("@StartDate", StartDate1)
This won't return anything if either of the following is true:
StartDate1 is a NULLParkingStartDate for all values is a NULL or equal to StartDate1 (obvious one)Check that you are passing a non-NULL value in StartDate1 and there are records satisfying your condition.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With