Categories
Mastering Development

is there a way of returning a bool value from db.Execute(sql) in C# mysql?

I am fiddling around with some mysql commands and would like to know how I can return a bool if my command was successful, here is some example code… public static bool RunSQL(string SQL) { try { // Info: db is defined in my dependency service! bool execute = false; Console.WriteLine(SQL); execute = Convert.ToBoolean(db.Execute(SQL)); db.Close(); […]