SQL_BINDIN handleIdent_Int, retCodeIdent_Int, _Par1, _Par2, ... SQL_BINDIN handleIdent_Int, retCodeIdent_Int, _VarRowIdent |
| handleIdent_Int | in | Identifier - the unique number (handle) of a connection. |
| retCodeIdent_Int | out | Return code identifier. |
| _Par1, _Par2, ... | in | List of objects, constants or local variables, which will specify the values of parameters of parameterized SQL command SELECT. |
| _VarRowIdent | in | Reference to a row of local variable of the Record type or to a row of structured variable. The row's values will specify the values of parameters of parameterized SQL command SELECT. |
Example
Work with a database (actions SQL_ ...)
INT _handle ; handle to database
INT _retCode ; return code
TEXT _name ; product name
TEXT _type ; product type
; parameterized SQL command
TEXT _sql = "SELECT Name, Type FROM Products WHERE ID>= #PAR# AND ID<= #PAR#"
SQL_CONNECT MyDatabase, _handle, _retCode
SQL_PREPARE _handle, _retCode, _sql BINDOUT _name, _type
SQL_BINDIN _handle, _retCode, 1, 100 ; read all products between 1 and 100
DO_LOOP
SQL_FETCH _handle, _retCode
EXIT_LOOP _retCode # _ERR_NO_ERROR
; data processing goes here
END_LOOP
SQL_FREE _handle
SQL_DISCONNECT _handle
|