>Thanks for your responses, I have taken these into account.
>
>However, I would greatly appreciate it if you could tell me how to speed up a particular part of the program which takes the longest processes:
Kev,
This looks pretty good to be honest, but there are a couple of things you could do...
Your scatter Memvar & insert into commands could list the fields explicitly
eg
Insert into (table2) (purchord.field1, purchord.field2, etc..)
This removes the need to change work areas and is faster (apparently).
The External procs (getnote, getproperty) where are they stored?
If they are not in this .PRG then Fox will start searching for them. If there are a lot of files in the search path/directory this can take some time.
The other thing I have done is put the select statements inside the if seek clause - and used the second parameter of the seek to specify the table
Last one.. the last if Seek command, as it doesn't do anything else apart from getproperty I have put it onto 1 line with a "And" clause and got rid of the Select statement (need to check if getproperty needs to have supplier selected)
That's about it really
HTH
Will
Select purchord
If SEEK(g_cl_ref)
Scan WHILE cl_ref = g_cl_ref
Scatter MEMVAR
Insert INTO (_table2) FROM MEMVAR
If SEEK(purchord.po_ref, 'poline')
Sele poline
Scan WHILE poline.po_ref = purchord.po_ref
GetNote(poline.pl_ref+"SERVICE")
Select poline
Scatter MEMVAR
Insert INTO CPoline FROM MEMVAR
Endscan
Endif
If SEEK(purchord.po_ref, 'Suspend')
Select SUSPEND
Scan WHILE SUSPEND.po_ref = purchord.po_ref
Scatter MEMVAR
Insert INTO CSuspend FROM MEMVAR
Endscan
Endif
=SEEK(purchord.rs_ref,'supplier') And GetProperty(supplier.Pr_Code)
Endscan
Endif
Will Jones