Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot change cursor column name
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01646543
Message ID:
01646570
Views:
48
>>UPDATE. I found the cause of the problem. When the column name is greater than 10 characters, you cannot change it. Strange though that VFP allows creating a cursor with a column with the name greater than 10 char, but won't allow to change the name.
>>
>>Hi,
>>
>>I want to change a cursor column name. When I do it in the Command window, it works. Here is the code:
>>
>>cCursorName = "MyCursor"
>>cFieldFrom = "FieldName1"
>>cFieldTo = "FieldName2"
>>alter table (cCursorName) rename (cFieldFrom) to (cFieldTo)
>>
>>So the above works without a problem in the Command window.
>>
>>But when I have pretty much the same code in the .PRG of the program, I get error:
>>
>>Error 1115
>>Invalid Operation for the Cursor
>>
>>
>>Could someone explain why? TIA
>
>How did you create the cursor?
create cursor mycursor (description c(50))
Note that the field name is greater than 10 char. And I could not change the name.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform