Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select from SPT - Into Array?
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 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01421480
Message ID:
01421527
Vues:
32
What is toP1. Is it a handle?

>Hi Matt,
>
>in one framework I have a sqlVal() function for this:
>
>
>Procedure sqlVal(tcExpression, tcTable, tcWhere, toP1)
>	Local lnSelect
>	lnSelect = Select()
>	Local lcCmd, luVal
>	lcCmd = "Select " + m.tcExpression + " as val"
>	If not Empty(m.tcTable)
>		lcCmd = m.lcCmd + " from " + m.tcTable
>		If not Empty(m.tcWhere)
>			lcCmd = m.lcCmd + " WHERE " + m.tcWhere
>		EndIf 
>	EndIf
>	If sqlDo(m.lcCmd,m.toP1,"sqlget")
>		luVal = sqlget.val
>	EndIf 
>	Use in Select("sqlget")
>	Select (m.lnSelect)
>Return m.luVal
>
>The call would be like this:
>
>? sqlVal("sum(qty*price)","JobItems")
>
>sqlDo is basically SqlExec, except that it gets the handle before.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform