>>>>You did say at one point the whole thing took much longer and then suddenly it was much improved. I didn't notice if it was exclusive or not. Network traffic could be the culprit.
>>>
>>>Something happened with the PC where this process was running, I think. I have no explanation for 2h. of running this process.
>>>
>>>>Now, a difference of only 5 seconds seems to disprove the chunking theory. It would fit my thinking of there being only a difference in the number of executing lines of code. Small difference, but there. How many records are we talking about?
>>>
>>>Just 2046 records to process.
>>
>>Then there's no need to spend time optimizing this.
>
>I think I see what's going on. I'm studying right now Batch Services code and see code similar to this in various places:
>
>DO WHILE lcErr == "Error Found!"
> TRY
> lnAttempt = lnAttempt + 1
> IF lnAttempt != 100000
> OPEN DATABASE (thisform.cDatabase) SHARED
> lcErr = "Error Not Found!"
> ELSE
> lcErr = "Error Not Found!"
> ENDIF
> CATCH TO oException1
> lcErr = "Error Found!"
> ENDTRY
> ENDDO
>
>
If you made a local copy of the DBC, you wouldn't need such code and you'd get better performance over all.