Hi there,
Your issue is because you have additional quotes wrapped around your column name.
What you want is :
SELECT COUNT(*) FROM Applications_Setup WHERE ComputerSerial = 'ABC'
But what your code is actually executing is :
SELECT COUNT(*) FROM Applications_Setup WHERE 'ComputerSerial' = 'ABC'
For the latter, it's comparing two strings so will always return false (Unless you have a column value the same as the column name I guess!).
Simply change this line :
MySqlCommand cmd = new MySqlCommand("SELECT COUNT(*) FROM Applications_Setup WHERE '" + row + "'='" + Name + "'", conn);
To
MySqlCommand cmd = new MySqlCommand("SELECT COUNT(*) FROM Applications_Setup WHERE " + row + " = '" + Name + "'", conn);