Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Execute an SQL statement that is stored in a String?
I want to let the users choose from a lot of options in a Form, then, based on that options, my aplication build an SQL statement and store it in a String.
Something like this:
sStatement = "SELECT * FROM " + Combo1.Value + " ORDER BY " + Combo2.Value
Actually I create more complicated Querys, but that´s the idea.
I do not want to create a fixed Query for all the 130 diferent combinatios that the user can choose from, so I need to do something like that.
As you can see, not only the variables values are going to change, also the table names and field names will.
I`m using a local Database
Thanks in advance
Suivant
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