mySQL .NET API - Delete all data from table
- by keynesiancross
Hi all, I'm trying to figure out if there is an easy way to delete all the data in a table using the mySQL .NET API. The only slightly more tricky part to this is that in the C# code, the business logic can be run in both cases where there is, or isn't, data in teh table. So in some regards I almost need an If statement...
Currently I am using the following code, but it doesn't seem to ever delete data...
string deleteSQL = "DELETE FROM `data`.`currentData`";
MySqlCommand cmd2 = new MySqlCommand(deleteSQL, conn);
Any thoughts would be much appreciated!
Cheers