How to use For loop with table datasource in axapta


 for (gationTemp = gationTemp_ds.getFirst(true) ? gationTemp_ds.getFirst(true) : gationTemp_ds.cursor(); gationTemp; gationTemp = gationTemp_ds.getnext())  
 {  
 tmpOff = gationTemp.OfficeCode;  
 allOffice += tmpOff;  
 allOffice += ",";  
 }