Freeing ZSQL result sets?
Greetings: How does one free ZSQL result sets? Here's the outline of my situation: 1. Do some logic in DTML and set some REQUEST vars which will be used in a query. 2. Run the query and do a dtml-in loop over it 3. In DTML, some more logic, which if a certain condition exists will re-set the REQUEST vars set in step 1 to new values 4. Run the query again and loop through it using dtml-in Step 4 breaks, presumably because it is still the same query instance as the first and the cursor is at the end of the set...? What is the appropriate way to handle this situation? Currently, I end up duplicating the query exactly into a new query with a unique name. I actually end up hitting that query 4 times in one page, so I have ZSQL methods eg query1, query2, query3, query4, all with identical SQL in them. I imagine I am missing something obvious... thanks for any anwers. Bryan
zoper@disturbance.dhs.org wrote at 2003-7-11 09:11 -0700:
How does one free ZSQL result sets?
They are freed automatically. Nothing needs to be done.
1. Do some logic in DTML and set some REQUEST vars which will be used in a query.
2. Run the query and do a dtml-in loop over it
3. In DTML, some more logic, which if a certain condition exists will re-set the REQUEST vars set in step 1 to new values
4. Run the query again and loop through it using dtml-in
Step 4 breaks, presumably because it is still the same query instance as the first and the cursor is at the end of the set...? What is the appropriate way to handle this situation?
When you call the ZSQL Method again (this may happen implicitely in DTML), the query is newly executed and the cursor is placed at the start of the new quere result.
...
Dieter
participants (2)
-
Dieter Maurer -
zoper@disturbance.dhs.org