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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

recordsets & com+

Status
Not open for further replies.

nigz

Programmer
Jun 15, 2001
60
GB
Hi - is it possible to cycle through a recordset in com+ from the client i.e.

with objCom
.recCom.MoveFirst
while not .recCom.EOF
'do some stuff
.recCom.MoveNext
wend
end with

When I do this each call to recCom appears to reset the recordset so that I always return the first record hence infinite loop - is there a settng in com which can stop this happening or do I have to load the recordset onto the client? TIA

 
Just some notes
Think about changing your "WHILE WEND" to a "DO LOOP"
this logic you have moves to the first record (note if there are no records you will get an error)
then interate through all the records then exit.

Depending on you object your recordset may be lost in transit. IE if you have a serverside cursor (meaning the cursor resides on the SQL server (not tha apps server) and you disconnect the connection then you will loose the data. Also note that recordsets have special marshelling that copies the entire recordset to the client not just the interface.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top