ESQL/C : Cursors statistics ?
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hi, I've several questions about CURSORs in ESQL/C (informix 7.24) 1)- I'd like to know how many CURSORs can I declare/open at the same time ? 2)- Same question with CURSORs declared WITH HOLD 3)- Is there a command that would give the max of this figure ? 4)- Is there a command that would give the number of opened CURSORs ? In fact, I declare and open a CURSOR WITH HOLD, then, if there is an error in my program (timeout on access to a distant database) 5)- Do the CURSOR stay open ? 6)- In my program, there is no FREE CURSOR, do you think it could be a problem ? thanks for your help Stephane PS : please answer by both e-mail and mail. -- ------------------------------------------ Stephane Revil-Baudard Hewlett-Packard SIDE-B3N2K3 Tel.: 04-76-14-63-59 ------------------------------------------
Stephane Revil-Baudard wrote: > > Hi, > > I've several questions about CURSORs in ESQL/C (informix 7.24) > > 1)- I'd like to know how many CURSORs can I > declare/open at the same time ? The release notes say the number of open cursors per user is port specific. I have programs with close to 1000 running up to 20 copies of each with no problems. > 2)- Same question with CURSORs declared WITH HOLD Adding the WITH HOLD option should make no difference. > 3)- Is there a command that would give the max of > this figure ? > 4)- Is there a command that would give the number > of opened CURSORs ? No way to determine except to keep track yourself. > In fact, I declare and open a CURSOR WITH HOLD, then, > if there is an error in my program (timeout on access > to a distant database) > 5)- Do the CURSOR stay open ? Cursor's stay open until closed either by an explicit CLOSE or FREE or because of an emplied CLOSE when COMMITTING or ROLLING BACK another cursor if not WITH HOLD. > 6)- In my program, there is no FREE CURSOR, do you think > it could be a problem ? Just bad form. Like malloc() without free(). > thanks for your help You're welcome. Art S. Kagel