The problem is in your select, because you can use the syntax, that Room = 'something'
, because text is not compatible with =.
Use LIKE
instead of equal sign (=)
.
Fixed query should look like:
SELECT Counter,Occupants FROM Rooms WHERE Room LIKE '{0}'
But I recommand to use SqlParameters
instead of string.Format
, because it is not secure.