>PUBLIC ARRAY aClient[0] >select client >do while not eof() > if substr(Client.clientcode, 1,1)="A" > insert to aClient <- I don't know how to code it for this part. > > endif > skip 1 >enddo > >PMFJI.
Local loCustomers loCustomers = Createobject("Empty") AddProperty(loCustomers, "records", 0) AddProperty(loCustomers, "aCustomer[1]", Null) Use (_samples+'data\customer') loCustomers.RecordS = Reccount() Dimension loCustomers.aCustomer[reccount()] Scan Scatter Name loCustomers.aCustomer[recno()] Endscan Use ? loCustomers.RecordS If loCustomers.RecordS > 0 ? loCustomers.aCustomer[1].Cust_Id ? loCustomers.aCustomer[1].Company *... EndifOr with a collection:
Local loCustomers As Collection, loCustomer loCustomers = Createobject("Collection") Use (_samples+'data\customer') Scan Scatter Name loCustomer loCustomers.Add( loCustomer, Trim(cust_id) ) Endscan Use ? loCustomers.Count If loCustomers.Count > 0 ? loCustomers[1].cust_id ? loCustomers[1].Company *... EndifCetin