Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select from SPT - Into Array?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01421480
Message ID:
01421527
Views:
33
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform