Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Altering a CUSOR's structure
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00062738
Message ID:
00062920
Views:
50
>>>I have tried to get the DBF() but, there is no guarantee that the the DBF() of a cursor exists as a file. I also got a 'Table in Use' error when attempting to ALTER TABLE the USEd AGAIN version.
>>>I was playing with the idea of altering the structure of a cursor based on run-time information. I guess I'll just have to use CREATE/ALTER TABLE and handle clean up myself or forget about it.
>>> Thank you for the response.
>>
>>A cursor is temporary and disappears as soon as it is closed. To alter any table structure you have to have exclusive use. So, if you have SET EXCLUSIVE ON before you issue the command to create it, you would have exclusive access to the cursor. The ALTER TABLE will work. AFter you create the cursor you can return the EXCLUSIVE setting back to the way it was -- store the original value using SET("EXCLUSIVE"). Since you are using a cursor, there is no reason not to have exclusive access to it, even in multi-user environment. Just the use the DBF() function to get its actual name.
>
>ALTER TABLE works fine but truncates long names to standard-10 as a side-effect, for some reason...related to not being in DBC, I guess?

Right. You can only have long names for objects contained in a DBC.
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform