|
|
|
|
|
- Loading the query in memory
- Partial Fetch
- Miscellaneous
SQLFirst (Function) In french: SQLPremier Positions on the first row of the query result. This row becomes the current row. If controls or variables are associated with the columns of query result ( SQLAssociate), the values found in the current row are automatically assigned to these elements. In most cases, SQLFirst is used in a read loop with SQLNext. Caution: This function must be used when browsing the result of a SQLFirst/SQLCol query.. For more details, see Types of SQL browse.
ResSQL = SQLExec("SELECT NOMCLI, PRENOM, ADR1, ADR2, VILLE, CP FROM CLIENT", ...
"REQ1")
IF ResSQL = True THEN
SQLFirst("REQ1")
ASC_ASCENS1..MaxValue = SQL.NbLine
ASC_ASCENS1 = 1
ELSE
END
SQLClose("REQ1")
Syntax
SQLFirst([<Number of rows>, ] <Query name>)
<Number of rows>: Optional integer Number of rows that will be loaded in memory every second. This number of rows will constitute a block for the partial Fetch. Parameter required to perform a read by partial Fetch. <Query name>: Character string Name of the query: Remarks Loading the query in memory If SQLFirst is called immediately after SQLExec, the query result is loaded in memory. Two methods are available: - Entirely load the query in memory if <Number of rows> is not specified. The number of records corresponding to the query result is automatically calculated. The SQL.NbLine variable is updated.
- Partially load the query in memory (also called partial fetch) if <Number of rows> is specified.
Only the first block of rows is loaded in memory. The following blocks are automatically loaded in background task (mechanism of partial fetch). The SQL.Retrieving variable (updated by SQLInfo) is used to find out whether the result was entirely retrieved. Note: Depending on how it is processed, partial fetching can free up network bandwidth..
- If the pointer is positioned outside the query result, the SQL.Out variable is set to True.
- The SQL.Current variable contains the number of the current row.
- SQLTable must not be used after SQLFirst. A fatal error is generated.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|