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 / HFSQL / Funciones HFSQL
  • Example: Adding a file into a binary memo
  • Example: Adding an image to a memo
HLinkMemo (Example)
Example: Adding a file into a binary memo
WINDEVWEBDEV - Código ServidorReportes y ConsultasCódigo de Usuario (UMC)PHPAjaxHFSQL ClassicHFSQL Client/ServerProcedimientos almacenadosHyper File 5.5OLE DBConectores Nativos
The following example is used to add any file into a "binary memo" item of a data file.
// Fill the different items of the file ...

// Was a file name specified for the description of the product?
IF NOT EDT_FILE_NAME ~= "" THEN
	// Checks whether this file exists
	IF fFileExist(EDT_FILE_NAME) = False THEN
		Error("Cannot add " + ...
			"the product description file " + ...
			"in the database: ", HErrorInfo())
		RETURN // or RETURN False
	END

	// Add the file that contains the product description 
	// in the binary memo item of the record
	IF HLinkMemo(PRODUCT,PRODUCTDESCRIPTION, EDT_FILE_NAME, ...
			hMemoBin,"File description") = False THEN
		Error("Cannot add " + ...
			"the product description file " + ...
			"in the database: ", HErrorInfo())
		RETURN //or SEND BACK False
	END
END

// Adds (or modifies) the product to the file of products
IF HAdd(PRODUCT) = False THEN // or IF HModify(PRODUCT) = False THEN
	Error("Unable to update the product file:", ...
			HErrorInfo())
	RETURN //or SEND BACK False
END

RETURN True
Example: Adding an image to a memo
WINDEVWEBDEV - Código ServidorReportes y ConsultasCódigo de Usuario (UMC)PHPAjaxHFSQL ClassicHFSQL Client/ServerProcedimientos almacenadosHyper File 5.5OLE DBConectores Nativos
The following example is a procedure used to add a product to the PRODUCT data file. This procedure is used to attach the image of each product in the memo of the record.
// Procedure used to add a product
FUNCTION bAddProduct(sProductName, sImage)

Product name
PRODUCT.NAME = sProductName

// Product image
IF HLinkMemo(PRODUCT,PHOTO, sImage, hMemoImg) = False THEN
	RETURN False
END

// Adds the product to the product file
IF HAdd(PRODUCT) = False THEN
	RETURN False
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: 23/11/2024

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