"SELECT * FROM TransferDetails WHERE Transfer_Number = '" + txtTransferNumber.Text + "'"
or
"SELECT * FROM TransferDetails WHERE Transfer_Number LIKE '" + txtTransferNumber.Text + "'"
You forgot
= or
LIKE
Better put a couple of spaces around * as well!