How to compare input from text box @Name with Name and Surname from my table, I want to compare string with Name + ‘ ‘ + Surname. I try this syntax but nothing happen.
command = new SqlCommand("SELECT Name, Surname, DriverPID FROM Drivers WHERE (Name + ' ' + Surname) = @Name", connection);
There is seemingly nothing wrong with your SQL syntax. Can you confirm you’re passing the correct value in?
And confirm that data should be returned by running a standalone SQL query?