I have a MB function that calculates the distance 
between two points and updates a table with the 
calculated value. As is, it runs at about two 
rows per second. If I comment-out the "update" 
statement, then it runs at about 600 rows per 
second. 

How can I speed up the update process?


        do while not EOT(tblTaggedPoints) 
                Fetch Next From tblTaggedPoints
                currentRow = tblTaggedPoints.rowID
                end_x = CentroidX(tblTaggedPoints.obj)
                end_y = CentroidY(tblTaggedPoints.obj)
                dist = 
Distance(start_x,start_y,end_x,end_y,"m")
        update tblTaggedPoints set DeltaDistance = 
dist  where rowID = currentRow
                start_x = end_x
                start_y = end_y
        loop


         Jack MacDonald, Senior Researcher, Harvesting Operations
             Forest Engineering Research Institute of Canada
        Vancouver, BC Canada   (604) 228-1555   FAX (604) 228-0999
                     
                 
                   
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to