Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ALTER TABLE issue with cursors
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00793667
Message ID:
00793784
Views:
20
Hi Igor,

ALTER TABLE command doesn't work on SPT cursors ('Function is not supported on remote tables').
The comment about ALTER TABLE command on cursors created by the CREATE CURSOR command is relevant only for VFP6 and maybe earlier. When such cursor has long field names they will be truncated to 10 characters after applaying ALTER TABLE command. In VFP7 and later such attempt wil generate an error.

>I wonder if anybody could comment whether or not it is reliable to use ALTER TABLE command against cursors created as a result of queries sent to SQL Server database (via SQLEXEC, sql pass-through) or just created with CREATE CURSOR. We used to use ALTER TABLE often in these situations, however, I found this comment in VFP 8.0 documentation (look at "ALTER TABLE - SQL Command" topic) and now I am not sure if ALTER TABLE is a reliable command against cursors:
>
>"ALTER TABLE might not produce consistent results when used with Visual FoxPro cursors created by the CREATE CURSOR command. In particular, you can create a Visual FoxPro cursor with features, such as long field names, that are normally available only with tables that are part of a database container. ALTER TABLE saves a temporary copy of the cursor, so the rules that apply to free tables also apply, and any features requiring database support are lost or changed in an unpredictable manner. Therefore, you should generally avoid using ALTER TABLE with Visual FoxPro cursors unless you have tested and understood the outcome."
>
>Specifically, this comment pays attention to long column names, which we use in our programming and it seems to always work reliably... So, what does this comment really mean?
>
>Thank you,
>Igor.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform