AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Administrar bases de datos / HFSQL / Funciones HFSQL
  • Example: Initializing and browsing an SQL query
  • Example: Connecting to an SQL Server database and executing a query
HExecuteSQLQuery (Example)
Example: Initializing and browsing an SQL query
HFSQL ClassicHFSQL Client/ServerConectores Nativos The following example is used to initialize a query and to browse it. This example uses the Data Source type to handle the query.
MyQuery is Data Source
// Initializes the query
IF NOT HExecuteSQLQuery(MyQuery, ...
"SELECT LASTNAME,FIRSTNAME FROM CUSTOMER WHERE CUSTOMER.LASTNAME = 'SMITH'") THEN
Error("Error while initializing the query" + CR + HErrorInfo())
RETURN
END
 
// Read the first record of the query
HReadFirst(MyQuery)
WHILE NOT HOut()
  // Process on the query record
  // Access to the items via MyQuery.<Item name>
  ...
  // Read the next record
  HReadNext()
END
Example: Connecting to an SQL Server database and executing a query
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/05/2022

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