Hello all,
i have been working on stopping duplicate entries going into my database and adding unique computer info like mouther bord serials as each pc motherboard will have a unique id,
so once i add them and have created database entryies and populated it.,
can see form below image,
and with this code here,
public static bool checkAppSetup(string Name, string row)
{
//" SELECT EXISTS(SELECT * from Applications_Setup WHERE '" + row + "'"+"="+"'" + Name + "')"
MySqlCommand cmd = new MySqlCommand("SELECT COUNT(*) FROM Applications_Setup WHERE '" + row + "'='" + Name + "'", conn);
object obj = cmd.ExecuteScalar();
if (Convert.ToInt32(obj) > 0)
{
return true;
}
else
{
return false;
}
}
and have tried the same code on mysql workbench and got a result.
any help would be much appreciated kind regards
elfenliedtopfan5