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 Client/Server
  • Copying several files onto an Android computer
HCopyFile (Example)
Copying several files onto an Android computer
Android This example shows a copy of several HFSQL data files from an HFSQL server to a local directory.
In this example, an information is displayed for each copy.
// sConnection is a connection defined programmatically.

gsMyLocalHFPath is string = SysDirStorageCard() + fSep() + "MyApplication Data" + fSep() 
sPassword is string = "My password"

NextTitle("Copying the Category file")
HourGlass(True)
IF NOT HCopyFile("", ...
	gsMyLocalHFPath + Category.Name + ".fic", sConnection, Category.Name + ".fic", ...
	hCopyIndex, "", sPassword) THEN 
		Error("Error while copying the file " + Category.Name + " locally")
END

NextTitle("Copying the BankAccount file")
HourGlass(True) 
IF NOT HCopyFile("", gsMyLocalHFPath + BankAccount.Name + ".fic", ...
	sConnection, BankAccount.Name + ".fic", hCopyIndex, "", sPassword) THEN 
		Error("Error while copying the file " + Category.Name + " locally")
END

NextTitle("Copying the Operations file")
HourGlass(True)
IF NOT HCopyFile("", gsMyLocalHFPath + Operations.Name + ".fic", ...
	sConnection, Operations.Name + ".fic", hCopyIndex, "", sPassword) THEN 
		Error("Error while copying the file " + Operations.Name + " locally")
END

NextTitle("Copying the SubCategory file")
HourGlass(True)
IF NOT HCopyFile("", gsMyLocalHFPath + SubCategory.Name + ".fic", ...
	sConnection, SubCategory.Name + ".fic", hCopyIndex, "", sPassword) THEN 
		Error("Error while copying the file " + SubCategory.Name + " locally")
END

NextTitle("Copying the User file")
HourGlass(True)
IF NOT HCopyFile("", gsMyLocalHFPath + User.Name + ".fic", ...
	sConnection, User.Name + ".fic", hCopyIndex, "", sPassword) THEN 
		Error("Error while copying the file " + User.Name + " locally")
END
// Close the houglasses 
HourGlass(False)
HourGlass(False)
HourGlass(False)
HourGlass(False)
HourGlass(False)

Info("The files have been copied onto the Smartphone.")
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: 12/06/2025

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