You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*) FROM DATABASE.TABLE1 WHERE COLUMN1 = 'KEY1' AN' at line 1
int countOERATION = Convert.ToInt32(cmdOPERATION.ExecuteScalar());
using (var cmdOPERATION = new MySqlCommand("SELECT COUNT (*) FROM DATABASE.TABLE1 WHERE COLUMN1 = '" + KEY1 + "' AND COLUMN2 = '" + KEY2 + "' ;", CONNECTION)) { int countOPERATION = Convert.ToInt32(cmdOPERATION.ExecuteScalar()); }
baseEntities dc = new baseEntities(); var getcount = dc.table.Where(b => b.column1 == key1 && b.column2 == key2).Count(); int count = Convert.ToInt32(getcount);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)