SQLPARAMS()
From Lianjapedia
Contents
Purpose
Expand the ? parameter values from a SQL statement
Syntax
SQLPARAMS(<cSQLCommand> [, <cDBType>])
See Also
SQLCANCEL(), SQLCOLUMNS(), SQLCOMMIT(), SQLCONNECT(), SQLDISCONNECT(), SQLERROR(), SQLEXEC(), SQLGETPROP(), SQLMORERESULTS(), SQLPREPARE(), SQLROLLBACK(), SQLSETPROP(), SQLSTRINGCONNECT(), SQLTABLES(), SQLTRANSACTION()
Description
The SQLPARAMS() function is used to expand the ? parameter values from a SQL statement.
Keywords | Description |
---|---|
cSQLCommand | The SQL statement to be expanded. |
cDBType | Optional. The remote database type. |
SQLPARAMS() returns the full SQL statement with all ? parameters expanded.
Example
cName = "%Mountain%" cColor = "Black" cSQL = "select * from Production.Product where name like ?cName " + ; "and color = ?cColor" nStatHand = sqlconnect("lianja_mssqltest") sqlprepare(nStatHand,cSQL) sqlexec(nStatHand) list ? sqlparams(cSQL, "MSSQL") // Returns: select * from Production.Product where name like '%Mountain%' and color = 'Black' sqldisconnect(nStatHand)