Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running a SQL-Select from a macro
Message
De
17/08/2004 18:10:21
 
 
À
17/08/2004 17:47:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00933949
Message ID:
00933951
Vues:
18
My suggestion is to move the content of the property to a varaible before executing as a macro. I have never had much luck in expending a property's content with '&' macros.
cSQL = THisForm.SQLQuery
&cSQL
>Hi,
>
>I am trying to create a form that contains 5 rows of combo and text boxes that forms the basis of a "Where" condition in a SQL-Select query.
>
>1st combo box represents the field list of the table.
>2nd combo box represents the operators i.e. ==, >=, etc
>3rd test box represents the value to test the query (user enters value)
>4th combo box represents the logical operators i.e. AND, OR, END (End signafies that the user is finished entering the where clause.
>
>When the "Run Query" button is clicked the code generates an error
>"Unrecognised command verb"
>
>The line of code reads as follows:
>
>"&THisForm.SQLQuery"
>
>The property above contains the following line:
>
>"Select * from membership where town == 'Cumnock' Order By 1 ASC Into Cursor Temp"
>
>I cannot see the error in the code. I have tried to execute the SQL statement manually and it works.
>
>Does anybody have any solutions?
>
>
>thanks in advance
>
>Jason
Greg Reichert
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform