>No sir, The Evaluation condition IF RECNO()%=0 is taking much more time as compared to my original code. I tested it 5 times on around 10000 records and fould that ech time it 30-35 seconds more. that may be perhaps of evaluating the IF condition each time.
>
>Than I removed both i.e Wait wind and IF condition , than too I found that there was hardly a 10 sec difference
>
>So i dont think that ,that issue is causing a huge delay
Surprised I did not see any 'thank you' in your reply - you might want to learn this
http://www.catb.org/esr/faqs/smart-questions.htmlDid you test the entire code or just the 3 last lines? The key point for optimization is the Seek() an INDEX on the foreign key of the child table. That'll be equally important with any method including SQL
good luck
Thierry Nivelet
FoxinCloud
Give your VFP application a second life, web-based, in YOUR cloud
http://foxincloud.com/Never explain, never complain (Queen Elizabeth II)