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
  • Running the query
  • Retrieving the query result
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
Runs the SQL code of a query created in the query editor.
Attention The function SQLExecWDR function does not start the memory result retrieval process. The result is retrieved on the first call to one of the following functions: SQLFirst, SQLTable or SQLFetch.
Ejemplo
Reportes y ConsultasHFSQL ClassicHFSQL Client/ServerHyper File 5.5OLE DBODBCConectores Nativos
// Run the query and retrieve the result line by line
i is int = 0
SQLExecWDR("QueryCustomer84")
WHILE SQLFetch("QueryCustomer84") = 0// There is still another line to read
	i++
	// Retrieve the data
	NAME[i] = SQLGetCol("QueryCustomer84", 1)
	FIRSTNAME[i] = SQLGetCol("QueryCustomer84", 2)
	EXTENSION[i] = SQLGetCol("QueryCustomer84", 3)
	{"IMAGE"+i} = SQLGetMemo("QueryCustomer84", 4)
END
SQLClose("QueryCustomer84")
Sintaxis
<Result> = SQLExecWDR(<Name of WDR Query> [, <Parameter 1> [... [, <Parameter N>]]])
<Result>: Boolean
  • True if the query was executed,
  • False otherwise. If the query was not run, the error message can be returned by the SQL.MesError variable once SQLInfo has been run.
<Name of WDR Query>: Character string
Name of query to be executed. This query was created in the query editor. This name corresponds to the logical query name.
<Parameter 1>: Type of parameter, optional
Value of first query parameter. Each parameter must correspond to the expected type. The different parameters are separated by a comma.
<Parameter N>: Type of parameter, optional
Value of Nth query parameter. The parameters must be specified in their initialization order (visible in the query editor). Each parameter must correspond to the expected type. The different parameters are separated by a comma.
Observaciones

Running the query

The information regarding the query execution is returned by SQLInfo. The SQL.NbCol variable contains the number of columns found in the query result.
Once it was run and processed, the query must be freed by SQLClose.

Retrieving the query result

Then, the query result can be:
  • Transferred into a table or into a list box (SQLTable).
  • Transferred into controls or variables (SQLAssociate).
  • Retrieved line by line (SQLFetch).
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