Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alter table to drop a column error
Message
From
06/04/2010 14:34:34
Mike Sue-Ping
Cambridge, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01459000
Message ID:
01459016
Views:
52
You're correct. It was the long field name that I was using that caused the issue.
Thanks.

>Are you sure that all fields names are no longer than char(10) ? The ALTER TABLE command will not work for the cursor with longer field names.
>
>>I execute a SQL command to pull some fields into a cursor. Part of the select command is'{ } as mydate'. I've made
>>sure that the cursor is created with the readwrite and nofilter clauses. After the query, I then try to drop one of the columns
>> (please don't tell me to exclude it in the first place) using:
>>
>>Alter table mytable drop column mycol
>>
>>and I get the following error message, "Invalid operation for the cursor".
>>
>>If I select "Help", it says, "An attempt was made to use the PACK command on a cursor."
>>
>>If I suspend the program and modify the structure of the cursor (manually drop the column) no error is thrown.
>>
>>I'm thinking that what I'd done manually should be capable of being done via code using the alter table...drop...command.
>>What am I doing wrong?
>>
>>Now here's the weird part. If I exclude the part, '{ } as mydate' from the SQL, there is no problem.
>>So, I guess my question is, how do I get an empty date field in my cursor AND be able to execute ALTER TABLE...DROP COLUMN...?
>>
>>TIA.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform