Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select all except
Message
From
20/11/2007 12:02:34
 
 
To
20/11/2007 11:50:49
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01269471
Message ID:
01270196
Views:
24
>>>>Another way to get the same is to
>>>>
Select * from ... into cursor tmp ... nofilter readwrite
>>>>alter table ... drop column somefield
>>>>
>>>>Don't remember the exact syntax for the drop. If you want to avoid getting the field even temporarily (because it's too long, or because it's a memo), then you need a full select statement. You may use Frank's macro, or build a field list as a string with that one field omitted, then use such a field list in a script that you'll execscript(), or run as a macro.
>>>
>>>Have you ever done this? Every time I've tried to alter table with a cursor I get an error that says it is an invalid operation for a cursor.
>>
>>The cursor must be read-write, then it's "legal".
>
>But when I omit the readwrite clause, I get "File f:\temp\00001zwp00h0.tmp is read-only.", not the "operation invalid for a cursor". Maybe that was the error in earlier versions of Fox?

I tried with VFP8, and it gave the same error messages as VFP9. Earlier versions of VFP did not support readwrite cursors natively, you had to trick it. And since this support was not native, I guess that the error messages also were different. I don't have older vesions installed, so I can not test.

>And yes (as to whether I tried it), on a readwrite cursor in VFP9 it just works.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform