4D v14.3SQL SET PARAMETER |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
SQL SET PARAMETER
SQL SET PARAMETER
The SQL SET PARAMETER command allows the use of a 4D variable, array or field value in SQL requests. Note: It is also possible to directly insert the name of a 4D object to be used (variable, array or field) between the << and >> characters in the text of the request (see example 1). For more information about this, please refer to the Overview of SQL Commands section.
The value of the 4D object replaces the ? character in the SQL request (standard syntax). If the request contains more than one ? character, several calls to SQL SET PARAMETER will be necessary. The values of the 4D objects will be assigned sequentially in the request, in accordance with the execution order of the commands. Warning: This command is used for handling parameters passed to the SQL request. It is not possible to use the SQL Param Out type to associate a 4D object with the result of an SQL request. SQL request results are retrieved, for example, using the boundObj parameter of the SQL EXECUTE command (see the Overview of SQL Commands). The SQL SET PARAMETER command is mainly intended for setting parameters passed to the request (SQL Param In); the SQL Param Out and SQL Param In Out types are reserved for use in the context of SQL stored procedures that could return parameters. This example is used to execute an SQL request which calls the associated 4D variables directly: C_TEXT(MyText) Same example as the previous one, but using the SQL SET PARAMETER command: C_TEXT(MyText) If the command has been executed correctly, the system variable OK returns 1. Otherwise, it returns 0. |
PROPERTIES
Product: 4D
HISTORY
Created: 4D 2004 ARTICLE USAGE
4D Language Reference ( 4D v12.4) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||