Warning! browse last restores only the appearance!
Gianni On Wed, 22 May 2019 08:29:31 -0700, "Fletcher Johnson" <fletchersjohn...@yahoo.com> wrote: Peter, It's been a while.... But I do know that this became a big issue when people found out that changes to what they thought was a temporary table/cursor were being made back to the actual table. I was able to demonstrate this in a session I gave at one of the Devcons. The addition of the NoFilter clause was made specifically to overcome this issue. In any case, my original point was that I wasn't sure who was being accused of "bad coding" - MS or someone else. I never really used the set filter - I always used "browse for ...." (when I did want to edit in the table directly) or Select.... (using noFilter only when I wanted to be able to edit the resulting cursor without updating the source table.) Even better, "Browse For ... " gave me flexibility that Set Filter did not and could be done in one line (which is what I believe was the objective of the original post.) Not to mention how great "Browse last" was as well. Anyway, I think this dead horse is suitably beaten (sorry PETA).... :) Fletcher Fletcher Johnson fletchersjohn...@yahoo.com LinkedIn.com/in/FletcherJohnson twitter.com/fletcherJ strava.com/athletes/fletcherjohnson 408-946-0960 - work 408-781-2345 - cell -----Original Message----- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Peter Cushing Sent: Tuesday, May 21, 2019 5:13 AM To: profox@leafe.com Subject: Re: Filtering Oddity So if you leave off the NOFILTER/READWRITE you have a read only file, so "edits to this cursor would be written to the actual source table" would not apply. It sounds like there are no circumstances where you could write data back from the select statement, or am I missing something? Peter On 21/05/2019 12:59, Richard Kaye wrote: > VFP's query engine decides what has less overhead; running the query or doing > a USE...AGAIN with a filter. NOFILTER and READWRITE force VFP to create a > temp file with the results. > > -- > > rk > > -----Original Message----- > From: ProfoxTech <profoxtech-boun...@leafe.com> On Behalf Of Peter Cushing > Sent: Tuesday, May 21, 2019 6:35 AM > To: profoxt...@leafe.com > Subject: Re: Filtering Oddity > > On 20/05/2019 19:39, Fletcher Johnson wrote: >> Not sure where the "Had to be bad coding" comes in. >> >> For example, if you did "select * from employee where last name = 'Smith'" >> you would get a cursor of only those employees. The employee table >> would still be open, but VFP opened it again, in a different work >> area, with a different alias, and then put a set filter. Edits to >> this cursor would be written to the actual source table. >> >> > Are you sure about that? Never heard of that behaviour before. > If I do a "Select * from picorder where vt_desc = 'India' into cursor > mycursor" I get a standalone cursor that I can't update (DBF() = > C:\TEMP\0000FABT02AV.TMP) > If I do a "Select * from picorder where vt_desc = 'India' into cursor > mycursor READWRITE" I still get a stand alone cursor that can be updated but > won't affect the source table. > If I leave off the into cursor mycursor then I still get a stand alone cursor > called query. > > I don't know if that behaviour was from an older VFP version but I don't > remember it. Am I getting Alzheimer's? Somebody put me out of my misery :-) > > Peter > > This communication is intended for the person or organisation to whom it is > addressed. The contents are confidential and may be protected in law. > Unauthorised use, copying or disclosure of any of it may be unlawful. If you > have received this message in error, please notify us immediately by > telephone or email. > > www.whisperingsmith.com > > Whispering Smith Ltd Head Office:61 Great Ducie Street, Manchester M3 1RR. > Tel:0161 831 3700 > Fax:0161 831 3715 > > London Office: 101 St. Martin's Lane,London, WC2N 4AZ Tel:0207 299 7960 > > [excessive quoting removed by server] _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/k3taee5hmqbfq1qruthl3qj17lqiihu...@4ax.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.