Code:
                                While ((Found) and Trans.StartDate >= dStartDate and Trans.StartDate <= dStopDate)
                                    Send AppendTextLn of oOnScreenOutput ("TransID:" * String(Trans.TransIdno)) // OnScreenOutput can be removed as suggested.
                                    Relate Trans
                                    //Find unrelated Attachment 
                                    Clear Equipmnt
Hmm... I noticed that you have a Relate statement in there. Have a look at that to see, if it is indeed necessary or if you could just find the parent(s) that you need for the update. If not remove the relate all together. That one is very expensive especially on MSSQLDRV.