Toad World® Forums

Toad Data Point 3.3 infinite looping issue

We are having an issue where a While loop will not exit. How do we fix this? The automation flow is not that complex but it runs correctly in Data Analyst but loops indefinitely in DataPoint. The SR number is 2782848 and a sample of a script that exhibits this issue is included. This is a high priority due to the timeline we need to meet and the number of scripts that need to be run. If they don’t quit like they are supposed to, as each new script launches the machine will get slower and slower.

I skipped the upgrade to 3.3 (not stable enough in the automation area). 3.6 is way better , it is what I am using now (or even the beta 3.7 from what I hear is really good). 3.3 was a no go for us, I would advise either move back to 3.2 or better upgrade to 3.6. Note: you may have to tweek some variables that are inside and outside of loops. There used to be one variable create/set value. Now there are two one the create it and one to set the value of an existing variable (this could be your problem). If you use the old set variable inside of a loop instead of the new set variable value, it will create a new variable with the same name who’s scope is only inside of the loop and not update the outer variable that you are probably testing to exit the loop.

We found the answer and it’s two-fold. The first part was corruption of the software installation on all of our machines in our group except for mine. This caused the tas files to be corrupt and not exit a loop even when the condition evaluated to false. The second was a fault in the current version of the software. If you declare a variable twice with the same name, there is no warning during compilation. We fixed it by setting up 2 variables one outside the loop (TD1) and one inside the loop that receives the results of the SQL test. Just after the SQL test, we assign the value of TD2 to TD1. This worked! We did not have to change any types of the variables to all be number…it does not strictly typecast so that was not the issue.