AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Administrar bases de datos / Funciones SQL
  • Loading the query in memory
  • Partial Fetch
  • Miscellaneous
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
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.
Warning This function must be used when browsing the result of a SQLFirst/SQLCol query. For more details, see Types of SQL browse.
Java The partial fetch is automatically performed by the Java framework.
// Initialize the scrollbar parameters at the end of query
ResSQL = SQLExec("SELECT CUSTLASTNAME, FIRSTNAME, ADDR1, ADDR2, CITY, ZIP FROM CUSTOMER", ...
		"QRY1")
IF ResSQL = True THEN
	// Displays the first row
	SQLFirst("QRY1") 
	// Initializes the upper bound of the scrollbar
	SCROLL_SCROLL1..MaxValue = SQL.NbLine 
	// Positions the scrollbar at the beginning
	SCROLL_SCROLL1 = 1
ELSE
	// Processes the error
END
SQLClose("QRY1")
Sintaxis
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.
Java This parameter is ignored. Indeed, the partial Fetch is automatically performed by the Java framework.
<Query name>: Character string
Name of the query:
Java The queries created in the query editor must be specified in the format of a character string.
Observaciones

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 frees up network bandwidth.
Java The partial fetch is automatically performed by the Java framework. The SQL.Retrieving variable is never initialized and it always returns False.
WINDEVWindowsCódigo de Usuario (UMC)HFSQL ClassicHFSQL Client/ServerHyper File 5.5OLE DBODBCConectores Nativos

Partial Fetch

If you are using the Partial Fetch to retrieve the query result (see the example for this function):
  • If SQLClose is called while the retrieval is not completed, the retrieval is stopped and the query is closed.
  • This method can be used with several queries at the same time.
  • The SQL.Retrieving variable (updated by SQLInfo) is used to find out whether the result was entirely retrieved.

Miscellaneous

  • 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.
Componente: wd300hf.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local