This can be useful for testing selected chunks of code during development, but it also gives you a VFP equivalent to the SQL Server Query Analyzer. In SQL Server, you can store several batches of T-SQL statements in a single query file and run them independently of one another using the Query Analyzer. In VFP, you can store several groups of SQL statements in a single program file and run them independently of one another using the Execute Selection command in a VFP editing window.
As in the Query Analyzer, you can revise the code in the VFP editing window and execute it without having to save the file. Unlike the Query Analyzer, though, the F5 key does not execute the selection in a VFP editing window. Neither does VFP recognize the GO command that signals the end of a batch in the Query Analyzer (GO has a different meaning in VFP); if you need a way of ending a batch of statements in VFP, use RETURN.
VFP's Execute Selection feature can be useful during development and testing of almost any kind of VFP code, but it's particularly handy when you're working with lengthy SQL statements. While you could use the VFP Command window for the same purpose, an editing window is much more usable when individual statements run into several lines of code, which is typically the case with SQL statements. A program file is of course also more useful than the command window when you want to save your work and return to it later.
07/12/2006 - Republished this post with corrected image and text layout.
Tags: Visual FoxPro, VFP, SQL Server, Query Analyzer
Tags: Visual FoxPro, VFP, SQL Server, Query Analyzer
3 comments:
I don't see the pictures, but you might be able to get rid of the problems by turning off the "Enable float alignment" option in Blogger.
The problem was the links to the images. They were relative to main blog page, which doesn't work when the individual post is viewed from its archive location. The images should show up now when the post is viewed from either location.
*rolls eyes* Yup, made that mistake too, on a regular basis...
Post a Comment