ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL Client/Server functions
  • 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.")
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help