Re: Update failed question
Posted in 1995
In Article <3lchsj$qlj@ftcnews.nrcs.usda.gov> Tammy Croteau writes: [..explanations deleted..] >works >for (i=0; i<600; i++) { > $BEGIN > $UPDATE .... > $COMMIT >} > With this one, it will work, because the COMMIT frees any lock created by the update. So, you only ever use one lock. >fails >$BEGIN >for (i=0; i<600; i++) { > $UPDATE .... >} >$COMMIT > With this one, every update causes a lock and you are running out of locks. So it bombs. Either, increase your locks or, before that $BEGIN, do a $LOCK TABLE FOO IN EXCLUSIVE MODE. Should be OK since you say there are no other users. Not nice in a multi-user system though. Regards Neil -- Neil S. Briscoe | The Three Stages of Life: Aldershot, Hants, England | First, you believe in Father Christmas neil@salmon.demon.co.uk | Then you don't believe in Father Christmas nbriscoe@cix.compulink.co.uk | And then, you are Father Christmas