David --
I did not know this...thanks for the tip!
I am presently developing a simple, query-like mechanism for one of my apps. It takes user-specified parameters and constructs a SQL SELECT statement. Like Mat, I was jamming the whole statement (including "SELECT") into a memvar and firing it with "&". So far, it seems to work OK, but I have not yet created and run the .EXE version. I probably would have agonized for days trying to solve this, so I reckon that you just saved me (and probably Mat, too) a lot of time.
Thanks again -- Bill
>Mat,
>
>Just to add a little to the other replies, you are better off just building the phrases as strings and issuing:
>
>lcSQL = "from table..."
>SELECT &lcSQL
>
>instead of
>
>lcSQL = "select ..."
>&lcSQL
>
>If it should happen that you don't have any other SELECT statements in your code an .exe can fail with a "Feature Not Available" error because VFP wouldn't include the necessary support for the SELECT command since it didn't find any SELECT statements during the compile.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement