Windows XP SP 2
DotNet Application - Dot net extensions turned on (Betting Exchange application)
I currently have a script which I use to clear markets (betting markets) from our database. If there are 200 markets then I will loop the script 200 times (done from main()). What I am using currently is quite simple really:
This simple code works most of the time. However, every now and again there is an Application error and the Market is not voided. There are a large number of reason why this might happen and I am not going to spend the time to troubleshoot each one of these (this script is run once a quarter to clear markets not in use so it is not necessary for me to spend more than 1/2 a day on this). Therefore, what I would like to do is the following:
Select row as in code above - Application error happens - dismiss the dialog. Done.
Instead of selecting the first row I should now select the next row down and perform the same actions as before. I need a way of tracking this as if the application errors happens again I then want to continue on with the next row again.
Note: when a market is voided it disappears from the list so the count will drop after every loop.
My ideas are to you set the row number as an integer and then somehow to increment this when an error happens (also there is a method called SetCurrentRow that I could use somehow).