Using a “Safe Select” to preserve your grid

Andy Kramek’s first big post is a great example of how to keep your grid settings using a Safe Select approach.

In short, “The idea is that since cursors are always created on the local user’s workstation, and are always opened exclusive, we can use the ZAP command to clear, without closing, a cursor. Then, instead of running a query directly into the working cursor we use an intermediate (or ‘dummy’) cursor as the target for the query and simply append the results from that into the working cursor. ”

Take a look at his great code samples. And of course, in keeping with Andy’s great sense of humor:

“As for the READWRITE clause if you are still using a version of VFP that does not support this, there is a way to do it, but I am not going to tell you because you should have UPGRADED. ”

Using a “Safe Select” to preserve your grid

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.


48 Stonemeadow Drive
Kanata, Ontario K2M2K2

+1 613-851-4496 Contact Us



Coming Soon