>Hi everybody,
>
>Say, I have a table with 60 or more fields. I want to create a cursor with the same structure. Is there a native VFP command, which would allow me to do that? I could not find it in Help. Of course, I have a workaround like building CREATE CURSOR statement on the fly using afields() and iterating through all fields, but it seems to be an overkill...
>
>Thanks a lot in advance.
=Afiel(aStru)
Select 0
Crea Curs newcurs From Array aStru
You may need to blank the 12th element in the first row of the array, that's where table's long name is. Depending on any triggers and other stuff you may or may not need to blank (some to "", some to .f.) other elements as well.