On Fri, Jul 11, 2014 at 1:13 PM, Gene Wirchenko <[email protected]> wrote:

> At 02:58 2014-07-11, Dave Crozier <[email protected]> wrote:
>
>> Readwrite has the same effect as NoFilter and also allows you to write to
>> the cursor.
>>
>
>      The docs do not support your statement.  There is nothing under SQL
> SELECT stating that READWRITE would necessarily use or not use a temporary
> cursor.  To be safe, I have the odd filter created using both options.
>
>
What are these "docs" of which you speak?

I checked the (extremely rare) PDF version of HackFox 7b and Tamar says,

"Before VFP 7, cursors created by SELECT-SQL were always read-only. You
couldn't change the data
in them either interactively or programmatically. In VFP 7, the new
READWRITE clause indicates
that the cursor created should be (surprise) read-write.

In FoxPro 2.x, read-only cursors were an important, frustrating limitation.
In Visual FoxPro, it
didn't matter too much. If you needed to be able to update cursor contents,
you could use a view
instead of a query to create the cursor.

There's actually a way around this limit, even in FoxPro 2.x. As long as
the query creates a "real"
cursor and not just a filter of the original table, you can USE the cursor
AGAIN in another work
area and it's read-write there.)

VFP 5 added the NOFILTER clause for INTO CURSOR. In order to do things as
fast as it can, FoxPro
pulls a little trick. If a query involves only a single table, has no
calculated fields, is fully
optimizable, and is sent to a cursor, rather than going to the trouble of
creating a whole new
cursor, FoxPro simply filters the original table. Often, that's good enough
for whatever you have in
mind. However, in some situations, especially those where the query result
is then used in a
subsequent query or where you want to index the cursor, having only a
filtered view of the original
causes problems. In VFP 3 and earlier versions, you worked around this by
putting something in
the query that outwitted FoxPro. Starting in VFP 5, it's a lot easier—just
add NOFILTER to the
query and FoxPro always creates a real cursor. (Doesn't "real cursor" sound
like an oxymoron?)

Although you can include both READWRITE and NOFILTER in a query, NOFILTER
is unnecessary. By
definition, any read-write cursor is not just a filter of the original
table. "



-- 
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/CACW6n4scSsSD3quZiZHAVDCZ5TS+qYCREboX3BY24SX=fve...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to