FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV Mobile 2024
→
HCopyFile for local mobile databases
HCopyFile for local mobile databases
Débuté par Mike Stewart, 09 fév. 2017 18:52 - 2 réponses
Connectez-vous…
Mike Stewart
#1
Posté le 09 février 2017 - 18:52
I seem to be on here every day lately... for which I apologise
Spent a day so far researching different angles on this one. I want to create a mechanism where I can copy the database files from one user to another (this is for a one off setup operation). The files themselves will be put into a zipfile and transferred to another device using onedrive. I am trying to make this as universal as possible across the mobile platforms.
When I have tried to use HCopyFile using the following
HCopyFile(HListConnection(,fSeparator(fCurrentDir()+"/copies/",fSeparatorPlatform)+"current_user.fic","","current_user.fic")
I can not find a method to establish where the files are kept on the device. I have tried various properties of the file. I have nothing..
Signaler
0
0
Fabrice Harari
#2
Posté le 09 février 2017 - 22:59
Hi Mike
to know where your files are, you can use MyFileName..Directory
However, according to the help, hcopyfile can be used to:
Copies a HFSQL data file (.fic, .ndx, .ftx and .mmo files if they exist):
from the HFSQL server to the server (to perform a backup for example).
from the HFSQL server to the client (to perform a local backup for example).
from the client to the HFSQL server (to update the data files for example).
from a HFSQL server to antoher HFSQL server.
And it seems to me that you are trying to copy from client to client,
which is not supported. If Im' correct, then you need to use fcopyfile
instead.
Best regards
--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting
Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM
(open source)
More information on
http://www.fabriceharari.com
Le 2/9/2017 à 12:52 PM, Mike Stewart a écrit :
I seem to be on here every day lately... for which I apologise
Spent a day so far researching different angles on this one. I want to
create a mechanism where I can copy the database files from one user to
another (this is for a one off setup operation). The files themselves
will be put into a zipfile and transferred to another device using
onedrive. I am trying to make this as universal as possible across the
mobile platforms.
When I have tried to use HCopyFile using the following
HCopyFile(HListConnection(,fSeparator(fCurrentDir()+"/copies/",fSeparatorPlatform)+"current_user.fic","","current_user.fic")
I can not find a method to establish where the files are kept on the
device. I have tried various properties of the file. I have nothing..
Signaler
0
0
Mike Stewart
#3
Posté le 10 février 2017 - 19:32
Thanks Fabrice
Unfortunately though MyFileName..Directory doesn't work for Android. WHat has worked though is the following.
zipCreate("DBArchive", fSeparator(fCurrentDir()+"/"+DateToString(DateSys(),"YYMMDD")+"ESPThinking.zip",fSeparatorPlatform))
sF is string =fListFile(fDataDir()+["/"]+"*.*")
FOR EACH STRING sNum OF sF SEPARATED BY CR
zipAddFile("DBArchive",sNum)
END
zipClose("DBArchive")
Signaler
0
0
→ Revenir à WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte