//Get Random StartTest() ; for (int e = 1; e <= 10000; e++) { //Employee ID Keys[0] = e ; //Get Boss ID from Employee Keys[0] = Result.Rows.Find(Keys)["superiorid"] ; BossRow = Result.Rows.Find(Keys) ; //Get Boss if (BossRow != null && (int)Keys[0] > 0) { do { Keys[0] = BossRow["SuperiorId"] ; BossRow = Result.Rows.Find(Keys) ; } while (BossRow != null && (int)Keys[0] > 0) ; } } EndTest() ;VFP Code (took 0.06)
=Start() FOR x = 1 TO 10000 *Get Employee =SEEK(x) *Get Boss DO WHILE SuperiorId <> 0 AND SEEK(SuperiorId) ENDDO ENDFOR =Finish()Not only that, but taking into account that VFP was only half the code.....