Re[2]: I4GL Error - no number - lock table
Posted in 1995
Topics: Storage & Space Management, Connectivity: ESQL/C, 4GL & Embedded SQL, Transactions, Locking & Isolation
Thanks for the quick answer Jonathan. However, I do not understand the answer, so I may not be asking the question right. Here are the exact steps to create the problem: from the $ prompt, I type> i4gl. Then, I type P for program, N for new, and "convert" for the program name. I then try to hit 4 for 4GL, O for Other, or L for library. At this point, I get the "Lock table can only be used within a transaction" message at the bottom of my screen. The only thing in convert.4gl is a comment line. (We've also tried to put some real code in, to no apparent avail.) I don't understand why it fails when trying to create a new program. We aren't compiling it or trying to execute anything yet. Other data: The 6.00 database uses buffered logging. The syspgm4gl has owner: sap753 in dbspace: rootdbs on: 04/24/95 log status: B An "ls con*" gives convert.4gl and convert.o. I don't have an SE engine. And all databases use buffered logging with the exception of the rootdbs which is U and cannot be changed. Thanks for any assistance, ...don ______________________________ Reply Separator _________________________________ Subject: Re: I4GL Error - no number - lock table Author: johnl@informix.com (Jonathan Leffler) at IMA Date: 7/6/95 10:42 a It is error -524; see also errors -255 and -327. I'd guess that the 4.11 database is unlogged and SE, and the 6.00 database is OnLine and logged. With a logged database, you can only issue LOCK TABLE statements within the scope of a transaction, and you cannot issue UNLOCK TABLE statements. COMMIT WORK release all locks and closes all non-HOLD cursors. With an unlogged database, you have to manually issue UNLOCK TABLE statements, and of course BEGIN WORK and friends do not work. You have to design programs carefully if they are to run unchanged in both logged and unlogged environments. You have to be even more careful if they are to work with both unlogged databases and MODE ANSI databases. And only with extreme difficulty can they be made to have the same error recovery characteristics under logged and unlogged databases. In fact, I'd suspect that the error recovery characteristics cannot be identical and that you could, with care, prove it. You have to consider transaction logging carefully when designing database programs. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> >Date: Wed, 5 Jul 1995 14:57:39 -0500 >From: DONALD_BOOTHBY_at_ISDLAN@ima.isd.state.in.us (DONALD BOOTHBY) >X-Informix-List-Id: <list.6812> > >The message appears: "Lock table can only be used within a >transaction" when I'm trying to create a new program, or trying to >modify an existing program in I-4GL 4.11 for Informix 6.00.UE1. > <<Clipped>> > >donald_boothby_at_isdlan@ima.isd.state.in.us >State of Indiana - Information Services Division >Indianapolis, IN 46204