The problem I have encountered is that, randomly, these variable lose their content. I say randomly because I can run the identical code, including database content three times and the variables will lose their content at different times. the only constant is that they invariably do lose them.
I have stripped down my code to the following steps:
Open ADO connection to MySQL database.
Select test from queue.
Insert new row into a test results table.
Read last_insert_id from database and store in variable called UIResultID.
Output UIResultID to log window. (note: this value is correctly output).
Select next test from test queue.
Output UIResultID to log window. (note: sometimes this is correct sometimes it's empty).
Repeat above two steps until test queue is empty.
Can you tell me if there are any known bugs/issues that could potentially cause my variables to lose their content?