I have a script which updates an ESS table, then continues with other steps assuming that the ODBC operation finished. The assumption doesn't work unless I pause for some period of time after committing the record. The period of time I use is what I consider the worst-case necessary time. I would much rather write a loop which paused for an optimistic period of time, then did something to check whether the ODBC operation is finished.
Is there a general way to do that, or do you have to write code specific to each operation?