Re: Stored Procedures
Posted in 1993
> > I have several stored procedures with about 100 lines of code in each. Each will compile and > run without any errors. However if I try to run multiple stored procedures from within one I4GL > program I receive erroneous error messages such as temporary files have been dropped when > they haven't, cursor not on select statement, etc. It seems like this would be a memory problem > with the 5.0 Online engine that might be solved with a parameter. If anyone has any ideas I > would appreciate any help you could offer. > > Regards, > > Roy Sendek > E-mail address rdsendek+amis1+_40%srbjg@mcimail.com Roy, This is a known bug between i4gl and Online 5.0 It is due to the fact that 5.0 issues statement id for each stored procedure and statement in the stored procedure. Theses numbers can get very high if you repeatedly call the procedures. Unfortunately 4GL cannot hold numbers this high so it truncates them effectively making the statement id in 4gl point at the wrong statement in the engine. The next time you refer to the statement there is a mismatch which results in fairly random error messages. Workarounds. This can be mostly worked around by declaring all stored procs once at the beginning of the program. This way statement id's issued for the stored procedures are all low enough to be recognised by 4GL. Fixes. Not untix 4GL is upgraded to cope with the larger statement id's. Cheers - Jim My opinions are my own. They may vary with time but they remain MINE! ---------------------------------------------------------------------- Name: Jim Gordon Internet: jgordon@ssf-sys.DHL.COM Company: DHL Systems Inc Phone: (415) 375-5222 (Work) Address: 700 Airport Blvd. #300 (415) 882-9728 (Home) Burlingame, CA 94010-1937 Fax: (415) 375-5019 ----------------------------------------------------------------------