SQLSetParameter - cBaseSQLExecutor
Sets a parameter for a parameterized query
Type: Procedure
Parameters
| Parameter | Type | Description |
|---|---|---|
| sParamName | String | Parameter Name |
| vValue | Variant | Parameter Value |
Syntax
Procedure SQLSetParameter String sParamName Variant vValue
Call Example
Send SQLSetParameter sParamName vValue
Description
SQLSetParameter sets a parameter for a parameterized query.
Call SQLParameterInfo to retrieve the full set of parameters.
Example
String[][] aStrings
// Prepare the query
Send SQLPrepare of ghoSQLExecutor @SQL"SELECT
Name,
City,
Zip FROM Customer
WHERE City = ${City}"
// Test for errors
If (not(Err)) Begin
// Set the parameter value
Send SQLSetParameter of ghoSQLExecutor "City" "Miami"
// Get the result set
Get SQLExecute of ghoSQLExecutor to aStrings
// Process results here..
End