AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Administrar bases de datos / Funciones SQL
  • Example 1: Reading the records without partial fetch
  • Example 2: Reading the records by partial fetch
SQLFirst (Example)
Example 1: Reading the records without partial fetch
This example runs a query and retrieves the query result directly.
SQLExec("select * from orderline", "Qry1")
SQLFirst("Qry1")
WHILE NOT SQL.Out
// CODE FOR PROCESSING RECORDS
// Go to the next one
SQLNext("Qry1")
END
Example 2: Reading the records by partial fetch
WINDEVWEBDEV - Código ServidorReportes y ConsultasWindowsCódigo de Usuario (UMC)PHPAjaxOLE DBODBC This example runs a query and retrieves the query result by partial fetch.
Multitask is required in order for the program not to go in active wait. If there is an active wait (no Multitask), the retrieval will be performed and there will be an endless loop.
SQLExec("select * from orderline", "Qry1")
// Retrieve 100 records in a background task
SQLFirst(100, "Qry1")
// We must be in the process of retrieval or not outside
WHILE SQL.Retrieving OR NOT SQL.Out
WHILE NOT SQL.Out
// CODE FOR PROCESSING RECORDS
    // Go to the next one
    SQLNext("Qry1")
END
Multitask(20)
// Attempt to go to the next record
//(updates the SQL.Out variable)
SQLNext("Qry1")
END
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