AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Administrar bases de datos / HFSQL / Funciones HFSQL
  • Example: Extracting the image of a product (syntax 1)
  • Example: Extracting the image of a product (syntax 2)
HExtractMemo (Example)
Example: Extracting the image of a product (syntax 1)
WEBDEV - Código ServidorWindowsLinuxAjaxHFSQL ClassicHFSQL Client/ServerProcedimientos almacenadosHyper File 5.5OLE DBConectores Nativos
This example is a procedure used to extract the image of the product associated with the current record.
PROCEDURE bExtractProduct(sProductName)
 
IF HReadSeekFirst(PRODUCT, sProductName) = True THEN
// Product image
IF HExtractMemo(SQLGetMemo("MyQuery", 2), "Product.BMP") = False THEN
RESULT False
END
END
RETURN True
Example: Extracting the image of a product (syntax 2)
WEBDEV - Código ServidorWindowsAjaxHFSQL ClassicHFSQL Client/ServerProcedimientos almacenadosHyper File 5.5OLE DBConectores Nativos
This example is a procedure used to extract, for the current record, the file associated with the PHOTO memo item.
The file is retrieved with its initial name in the current temporary directory.
PROCEDURE bExtractProduct(sProductName, sFileName is string)
 
IF HReadSeekFirst(PRODUCT, sProductName) = True THEN
// Product image
sMemoInfo is string
sMemoInfo = HInfoMemo(PRODUCT, PHOTO)
IF sMemoInfo = "" THEN
RESULT False // no file in the memo
ELSE
// Retrieves the name of the source file of memo (without path)
// with the temporary directory
sFileName is string
sFileName = fTempPath()+["\"] + ...
fExtractPath(ExtractString(sMemoInfo, 2, TAB), ...
  fFileName + fExtension)
 
IF HExtractMemo(PRODUCT, PHOTO, sFileName) = False THEN
RESULT False
END
 
END
END
RETURN True
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