| Stonefield Query SDK |
| GetValuesCollection |
The collection has an AddItem method that expects two parameters: the name of the value object and the value to assign to it.
Syntax
GetValuesCollection() as Object
Return Value
A collection to hold value objects.
Example
This example is taken from the end of an example in the Select help topic. It calls GetValuesCollection to create a values collection, adds two values to it, and then passes the collection to ExecuteSQLStatement to be used as the parameters for a stored procedure.
Visual FoxPro
if not empty(ldStartDate) and not empty(ldEndDate)
loValues = toApplication.GetValuesCollection()
loValues.AddItem('Beginning_Date', ldStartDate)
loValues.AddItem('Ending_Date', ldEndDate)
* Execute the desired stored procedure.
lcSelect = 'exec [Sales by Year]'
llReturn = not empty(toDatabase.ExecuteSQLStatement(lcSelect, ;
loValues, tcCursor))
endifSee Also
Application Object
| Last Updated: 02/12/2008 |