I assume you're trying to create a text file. Putting .txt on the end of the file won't do it. You're just creating a dbf with a .txt extension. Take a look at the help for COPY to see your options for file type. You'll probably want DELIMITED or SDF.
>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?
>
>
>David McInnis