Available in:
Apps (win)
Apps (char)
Reportwriter
RPC
Standalone PL
X
X
X
X
X
list list_open2(stmt,limit[,parm[,...]]) expr stmt int limit expr parm
limit | specifies the maximum number of rows that can be loaded
into the new list. If this parameter
is -1, the function executes a SQL DESCRIBE with the resulting
list containing the column information.
|
stmt | must be a select statement. Anything else returns an error. Statement parameters are specified in either "?" or ":n" format
depending upon the target database.
stmt can be a constant or variable string however it is
always treated as a dynamic statement. It is processed as follows:
|
parm | parameters used for any parameter markers in the select statement. Parameters can be individual variables except for lists, constants, parm.n, parm[n] or parm(). |
xx = list_open("SELECT * FROM " ^^ tname,-1);Load a list from the database.
xx = list_open("SELECT * FROM staff where id = ?",1000,10);Load a list from the database with multiple parameters.
xx = list_open("SELECT * FROM staff where id = ? and name like ? and salary < ?",1000,10,parm(2,2));