AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Administrar bases de datos / HFSQL / Funciones HFSQL
  • Example: Finding and deleting the customers with a given name
HBuildKeyValue (Example)
Example: Finding and deleting the customers with a given name
HFSQL ClassicHFSQL Client/ServerProcedimientos almacenados
The following code is used to build the value of the composite key from a specific first name and last name. An exact-match search performed in the Customer file is used to delete all the customers with a given last name and first name.
The record is deleted directly (it is not read).
// Build the value of the composite key
sSoughtVal is string = HBuildKeyValue(CUSTOMER, LASTNAME_FIRSTNAME, sLastName, sFirstName)
// Find the record
HSeekFirst(CUSTOMER, LASTNAME_FIRSTNAME, sSoughtVal)
WHILE HFound(CUSTOMER) = True
// Deletion
HDelete(CUSTOMER)
HNext(CUSTOMER, LASTNAME_FIRSTNAME)
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