>I have the following line of code in a prg:
>
>select invmain
>copy to myfile.txt
>
>The first run through, it works great.
>
>Subsequent runs, I get an error stating that myfile.txt is part of a database. Is this even possible? What am I doing wrong?
>
Try adding the FREE clause to the COPY TO
Are you really creating a .DBF, or do you want to emit a text file? If you're trying to emit a text file rather than a .DBF, you might want to use the TYPE SDF or DELIMITED clauses.