How do you know when your mysql commands have been executed?
I'm very new at MySQL and I'm trying to execute some commands, wait a certain period of time until they are uploaded and then check to ensure that the data from the commands is actually in the table so I can delete these files.
Is there any sort of first priority/instant way of executin开发者_如何学Cg these sort of commands? A way of setting the maximum amount of time these commands take to execute?
Thanks. By the way I am using C# and the OdbcCommand class
You don't need to check anything. If the database doesn't return an error, the data is written. MySQL does have a way to defer inserts, but it's not in the default version of INSERT, so you don't need to worry about it. When the query finishes without an error, the data is in the database (unless you are in a transaction, in which case the data is in the database after you commit the transaction).
精彩评论