Did you have loNode declared somwhere? Is it public or private variable?
Try
loNode = NULL
after your FOR EACH ... ENDFOR block
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.