Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remark to FAQ #541 (updateable cursor)
Message
From
06/08/1999 14:40:57
 
 
To
06/08/1999 11:27:19
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00250699
Message ID:
00250823
Views:
14
>Hi Evan.
>
>A remark to your advice to make a cursor updateable (FAQ #7830).
>
>Usually a VFP cursor refers to a DBF in the temp directory. Using this DBF again won't lead to any problems.

A VFP cursor does not get created with the .DBF extension, it is .TMP. It is R/W though.

>
>If the cursor is the result of a SQL-SELECT which queried one table solely without the use of restraining clauses like DISTINCT or GROUP BY, it will refer to the source table of the query. So DBF("cCursor") delivers the full name of the table you queried, and to manipulate the cursor that was used again means to manipulate the original table.
>
>That might get you in some trouble - at least it got me!
>

Correct, a SELECT - SQL cursor may just be a "filtered view" of the original table. If you use the DBF() function on the result cursor, and it ends in ".DBF", then what you have is a filtered view of the original table. If it ends in ".TMP", then it is it's own separate set of records, and is safe to "USE AGAIN" on this cursor. If you must USE AGAIN the result set, or use this result set in further queries, or make this result set R/W, then it is best to add NOFILTER when creating it.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform