Thank you LAVA! The hacker of yore did not know that Uniterated For Loops do not pass References!
The database is queried and sometimes (seldom) returns ZERO elements. A subsequent UPDATE statement was trying to update ZERO records in a loop and there was no shift register for the DB Connection reference. The next function after the loop was querying the DB with a null connection ref.
Now I can relax before going for my echocardiogram today...