AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

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 explains how to copy several HFSQL files from an HFSQL server to a local directory.
In this example, an information is displayed for each copy.
// sConnection is a connection defined through programming.
 
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: 27/05/2022

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