PRB: Cannot Modify Table Structure After Using SQL SELECT (133470)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
This article was previously published under Q133470 SYMPTOMS
After performing an SQL SELECT statement on a table, the table structure
becomes read-only, so you can't modify it.
CAUSE
Initially the SELECT statement is processed to see if the result set can be
obtained from the original table with the application of a filter. If it
can, a temporary cursor is not created on disk; instead, a filtered view of
the original table is created. You will see a cursor object in the View
window with the name QUERY, this is an alias of the source table.
Because you are looking at a filtered view of the original table, the
MODIFY STRUCTURE command won't work; the underlying table structure of the
result set has been temporarily frozen.
RESOLUTION
To execute an immediate MODIFY STRUCTURE command on the source table, you
must first close the QUERY cursor. Alternatively, you could avoid this by
editing the query to involve complexities that would force a temporary,
physically distinct cursor to be created.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 2/15/2000 |
---|
Keywords: | KB133470 kbAudDeveloper |
---|
|