do.until calls multiple instanaces -
04-08-2008
, 03:45 AM
Hello
I have an ActiveX script which loops round a recordset and for every
record calls another process. See below
************************************************** ************************************************** ********
do until SQLrs.EOF
n = SQLrs(0)
if n <> "0" then
call setStatusStart(SQLrs(0))
call getNotesData(SQLrs(0), getMaxTimeRT(SQLrs(0)))
end if
SQLrs.MoveNext
Loop
************************************************** ************************************************** ********
My issue is that from time to time, the recordset will contain > 1000
records meaning that call getNotesData(SQLrs(0),
getMaxTimeRT(SQLrs(0))) is actually invoked > 1000 times. The server
cannot handle this and crashes. I would like to configure it so that
the loop will not continue until the current instance of getNotesData
has completed.
Can anyone help or advise?
Many many thanks,
Allan |