Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create a cursor with predefined structure
Message
From
01/10/2001 18:27:14
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00562758
Message ID:
00562800
Views:
18
This message has been marked as a message which has helped to the initial question of the thread.
>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.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform