| Visual FoxPro Tips |
| |
| Using the Clipboard |
| |
| The Clipboard can be very handy
during development. For example, assume your method
builds a complicated SQL statement depending on
user's selections. Something like this: |
| |
| lcSQL = cSQLFields + cSQLSource
+ cSQLFilter + cSQLOrder + cSQLOutput |
| |
| * Execute the command using
Macro Substitution |
| |
| &lcSQL |
| |
| You test the program, and you
have a SQL error. However, you can't tell what the
problem is without looking at actual SQL statement.
You try debugging the code but the strings are two
long, and it's a hassle to try to see the whole
thing. How can you make this easier? Copy the SQL
statement to the clipboard and then paste it somewhere
convenient for analysis (e.g. FoxPro command window,
notepad, etc). To do this, simply call _cliptext: |
| |
| lcSQL = cSQLFields + cSQLSource
+ cSQLFilter + cSQLOrder + cSQLOutput |
| |
| _cliptext = lcSQL |
| |
| set step on && stop
the program |
| |
| That's it, your SQL statement
is now in the clipboard, and you can now switch
to another application to paste it. |
| |
| This tip is provided to you
by Foxy Classes.
For more Visual FoxPro tips, click
here. |
| |