Up until an hour ago when I ran my QARun script (selecting data from a SQL Server database and writing that data out to a file) all was fine.
Suddenly for no reason I can work out, the script gets 2/3 of the way through (looping through many times to retrieve different record sets through dbselect) and then gives 3 messages in a row before Dr Watson throws a wobbly:
"QARun - Runtime error: Unknown exception error in script 'Comparison' at line 188".
"Microsoft Visual C++ Runtime Library - Runtime Error! Program C:\QARun\Program\RUNAWL.EXE Abnormal program termination"
"RUNAWL.EXE - Application Error - The instruction at "0x77f6ccca" referenced memory at "0x00000070". The memory could not be "written". Click OK to terminate the application."
I'm stuck - lost and unable to work out what is going on!
The messages occur at a select statement, but until an hour ago that statement worked fine.
I've tried the following:
1) reboot computer
2) remove the "offending" element of the loop that throws the error up when it hits the SQL - the error still appears only 1 loop later
3) reinstalling the QARun client on my machine.
None of the above worked. Please help as a looming deadline is coming up.
Chatting with them at the moment - someone will get back to me in the morning(UK) but if anyone knows what's caused this I'd be eternally grateful!
Update: the following day... I just realised that after a dbselect("select * from x") one needs to put a dbclose() to clear the record set that had been generated *before* one can use another dbselect(). The documentation does not make this clear that this is necessary. In fact, the dbselect examples don't even have dbclose() in them!
Looking at dbclose() doesn't make the necessity of this clear either.
I'm /guessing/ that when the first dbselect() is run, the memory space is allocated and fixed at a set size. Therefore if a later dbselect() contains more than this space can cope with, it overruns it and can't write to it (hence the error messages). Using dbclose() first forces dbselect() the second time round to assign new memory space of the correct size.
This explains why smaller record sets worked ok on second or subsequent dbselects() but 2/3 the way through the script it went wrong (big dbselect()).
The only bit I don't understand is why this wasn't a problem before 11am yesterday and *no* code modification was made after then but that's when the problem occurred.
I have more than 6 databases (.mdb) with different functionality and I am running the recorded scripts through batch files. Is it possible to load other databases through batch file? If it is possible please let me know the detail steps.