Re: 4GL err -257: System limit on maximum number of statements exceeded
Posted in 1996
Andrej Falout wrote: > > Hi, ... > I writhed a test program with 70 times (my limit is 64) of: > > declare a1 scroll cursor for x1 open a1 fetch first a1 into p_test.* > ....... > declare a70 scroll cursor for x1 open a70 fetch first a70 into > p_test.* > > and only one prepare (of x1) at the beginning, and it did NOT reported > any errors. So, declare does not count ? > > I MUST reduce only prepare stmts.? > > Can I simply re-use names (stmt ID) I give in prepare for different > SQL statements, without using FREE ? I want to avoid using FREE. What do you have against FREE statements. If you don't need the statement anymore, it is excess baggage. Do you have a closet of neckties you never wear anymore? ;-) I think you can reuse a statement ID, and it should free up the structures & cursors associated with the name. After all, look how "query by example" uses prepared ststements. However, for human programmer reasons, I think it's not a good idea to use one statement ID for two totally different SQL statements. It will serve to confuse anyone looking at your code, including you when you have to debug it 2 months later. -- Jake Salomon (Believes in freedom for statement ID's) +-----------------------------------------------------------+ | Diplomacy: The art of getting something off your | | chest without losing your shirt | +------------------------Alfred E. Neuman-------------------+