Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Too Many Client Tasks

Status
Not open for further replies.

matttoby

Programmer
Mar 30, 2001
14
GB
matttoby (Programmer) Apr 2, 2001
I am attempting to open up one recordset and then loop through this recordset and create a new recordset on each loop through.

E.G.

SET RSouter = server.createobject("adodb.recordset")
SQL = "SELECT * FROM xxx WHERE xxx"
RSouter.open SQL,"DSN=xxx"

DO until Rsouter.EOF

SET RSinner = server.createobject("adodb.recordset")
SQL = "SELECT xxx FROM xxxx WHERE id = Rsouter("id")
RSinner.open SQL,"DSN=xxx"

<!--Modify RSinner-->

RSinner.close

RSouter.movenext

Loop
Rsouter.close

However I am receiving an error saying Too many client tasks. Any help would be much appreciated as I have come up against this problem a number of times.
 
Hi

Could you not pull in the entire recordset in one hit (using a JOIN) and then you'd only be looping to amend the data?

Darren
 
I agree with Darren that you'd be better off getting the records that you want to update through a join statement, however, if you want to stay with the way you're doing it, you might consider setting your RSInner recordset to nothing after you've updated it (within the outer loop). That might free up some of the resources that you are using. You're closing the inner rs, but it still exists until you set it to nothing.

Good luck,
Glenn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top