tags:

views:

26

answers:

1

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 executing 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

+2  A: 

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).

Lukáš Lalinský
Okay, but if the inserts are immediate, why isn't the information immediately appearing in the MySQL table and able to be looked up with the Select * ... command? This data is from clinical research patients so I'm just trying to cover unforeseen circumstances.
Chad
It should become visible immediately after you execute a COMMIT, which should be in the same transaction as your inserts/updates.
Carl Smotricz