Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLPT question
Message
De
26/07/2002 01:05:28
 
 
À
26/07/2002 00:34:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Divers
Thread ID:
00682865
Message ID:
00682869
Vues:
19
If your have a String, you have to concatenate just like this:
[fieldname = ] + lc
and not like this:
[fieldname = "] + lc + ["])
>calling function)
>lc = has desired value for fieldname
lcParam = "fieldname = " + lc
n = MyCount([tablename],lcParam)
>n = MyCount([tablename],[fieldname = "] + lc + ["])

>FUNCTION MyCount
>LPARAMETERS tcTable,tcCondition
>...
>jc = [SELECT COUNT(*) AS c FROM dbo.] + tcTable + [ ] + tcTable ;
>+ IIF(EMPTY(tcCondition),[],[ WHERE ]+ tcCondition)
>lnRetVal = SQLEXEC(lnHandle,jc)
Be fast like the Fox
Be free like the Penguin
Se Rápido como el Zorro
Se libre como el Pingüino
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform