FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
Query with Subquery /w Parameter
Query with Subquery /w Parameter
Débuté par Andreas Dolleschal, 08 nov. 2007 16:53 - 3 réponses
Connectez-vous…
Andreas Dolleschal
#1
Posté le 08 novembre 2007 - 16:53
Hello,
I have defined a query (QRY_A) which using a Subquery (QRY_
for a specific Field (defined as parameter FIELD_A). The Subquery also has a parameter (FIELD_
which will be filled by a field on my window.
It seems that the Parameter for the Subquery is ignored if I'm setting the Parameter for the Query (i guess the reason is because the query will be called internal).
I'm using the following code:
QRY_B.FIELD_B = "TEST"
HExecuteQuery(QRY_A)
Doing it this way does not work. Is there any other way the define the Parameter FIELD_B for QRY_A?
Thanks a lot.
Best regards
Andreas
Signaler
0
0
mat
#2
Posté le 08 novembre 2007 - 18:13
...
>I'm using the following code:
QRY_B.FIELD_B = "TEST"
>HExecuteQuery(QRY_A)
Doing it this way does not work. Is there any other way the define the Parameter FIELD_B for QRY_A?
...
Hi,
unless there is something I don't understand properly, above you are setting the parameter of query_B not Query_A...
Regards
mat
Signaler
0
0
Andreas Dolleschal
#3
Posté le 08 novembre 2007 - 18:33
>...
I'm using the following code:
>>QRY_B.FIELD_B = "TEST"
HExecuteQuery(QRY_A)
>>Doing it this way does not work. Is there any other way the define the Parameter FIELD_B for QRY_A?
...
>Hi,
unless there is something I don't understand properly, above you are setting the parameter of query_B not Query_A...
>Regards
mat
Hi mat,
You are right. Thats because FIELD_B is the Parameter for the Subquery. This Parameter is not visible in QRY_A because it's a parameter of QRY_B
I did it now by not using the Subquery, i'm calling QRY_B directly and parse the results into the Parameter of the Main-Query, this works. I assumed it would be easier with an subquery.
Best regards
Andreas
Signaler
0
0
Wim MEURISSE
#4
Membre enregistré
1 message
Posté le 06 août 2018 - 11:50
Hello,
I got this working this way:
QRY_B.param1 = value1
QRY_B.param2 = value2
if HExecuteQuery( QRY_B ) then
if HExecuteQuery(QRY_A,hquerydefault,value1,value2) then
for each QRY_A
tabledisplay(TableA, <fields of QRY_A)
end
end
end
Param1 and Param2 are not defined in QRY_A, but still I'm able (and even required) to add them in HExecuteQuery
I hope this helps...
Wim
Message modifié, 06 août 2018 - 11:50
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte