Can you explain me what you trying to do?
Why you put an endless loop in DO WHILE LOCK(...) I can't translate the message :o)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.