Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLEXEC with Inner Join
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Firebird
Divers
Thread ID:
01234927
Message ID:
01234952
Vues:
13
This code still works, but if I put "AS", it doesn't.
SQLSETPROP(lnHandle, [Asynchronous],.f.)

TEXT TO lcSQL NOSHOW PRETEXT 15
     SELECT TAlias1.PIF_NAME,
            TAlias2.PIF_ID
     FROM CLIENTS TAlias1
     INNER JOIN PAYMENTS TAlias2 ON TAlias1.PIF_ID = TAlias2.PIF_ID
ENDTEXT
IF SQLEXEC(lnHandle, lcSQL , "CPAY") < 0
   AERROR(laError)
   MessageBox(laError[1,2])
ENDIF
Another one.. this one works
TEXT TO lcSQL NOSHOW PRETEXT 15
    Select * from "Pay Batch" WHERE RTRIM(Month)= 'June' AND YEAR = 2007
ENDTEXT
This one not
xMonth = 'June'
xYear = 2007
TEXT TO lcSQL NOSHOW PRETEXT 15
    Select * from "Pay Batch" WHERE RTRIM(Month)= xMonth AND YEAR = xYear
ENDTEXT
Error with Connectivity Error [...]To few parameters. expected 2

What's wrong with the last code? Can you help again?

Thanks.
>> INNER JOIN PAYMENTS TAlias2 ON TAlias1.PIF_ID = TAlias2.PIF_ID
>>ENDTEXT
>>IF SQLEXEC(lnHandle, lcSQL , "CPAY") < 0
>> AERROR(laError)
>> MessageBox(laError[1,2])
>>ENDIF
>>
>
>Is it possible you set that connection to run queries Asynchronous?
>What happens with this:
>
>SQLSETPROP(lnHandle, [Asynchronous],.f.)
>
>TEXT TO lcSQL NOSHOW PRETEXT 15
>     SELECT TAlias1.PIF_NAME,
>            TAlias2.PIF_ID
>     FROM CLIENTS TAlias1
>     INNER JOIN PAYMENTS TAlias2 ON TAlias1.PIF_ID = TAlias2.PIF_ID
>ENDTEXT
>IF SQLEXEC(lnHandle, lcSQL , "CPAY") < 0
>   AERROR(laError)
>   MessageBox(laError[1,2])
>ENDIF
>
Jojo R. dela Cuesta, B.Sc.
eConsultant, Programmer
Dalplus Technologies
http://www.dalplus.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform