>I have a program which executes some SQL and then outputs an output file named as a PDF. I then carry other functions within my program.
>
>The problem is the next line of code after producing the file is to rename it. When i try to rename the file it says the file doesn't exist. If I pause the program for a while then execute then it works fine.
>
>How do I get my program to wait until the file exists?
>
>Many Thanks
declare Sleep in win32API integer dwMillisecs
do while !file(m.lcFileName)
Sleep(1000)
enddo
Cetin