FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
HRestoreBackup
HRestoreBackup
Débuté par Rik, 07 oct. 2017 20:09 - 7 réponses
Connectez-vous…
Rik
#1
Posté le 07 octobre 2017 - 20:09
Hello All,
At this moment I am busy developing an automated backup program for my customers.
Till now only the creation of the full backup is accomplished, restoring is still failing. For testing purposes I use the simplified code below:
MyConnection is Connection HCloseConnection(MyConnection) HRestoreBackup(MyConnection,DataPath) But if I try to restore, I get the following error (DESKTOP = my own machine):
Error returned by < Server:4900> server: You cannot restore the < Database> database because the < MyConnection> connection opened from the < DESKTOP> computer for the < admin> user uses this database. It looks like a pretty straightforward issue, as I still have some sort of connection open to the database. But this is certainly not the case, as my code suggests above.
I tried multiple things with disconnecting the connections with HFSQL Control Center, although this had no effect whatsover.
I already looked at the "WD Duplication" example which didnt even require a disconnect.
Any tips or solutions will be appreciated!
Regards,
Rik
Signaler
0
0
Walter Dieltjens
#2
Posté le 08 octobre 2017 - 14:15
Hi
Make sure the HFCC program is closed and try again
Signaler
0
0
Rik
#3
Posté le 08 octobre 2017 - 16:35
Hello Walter,
Thank you for your fast response.
That was my first test case, but didnt help either.
Regards,
Rik
Signaler
0
0
Fabrice Harari
#4
Posté le 08 octobre 2017 - 23:06
Hi Rik,
it looks like a case of multiple connections inside your application.
You have to understand that:
- each independent HF context creates a duplicate of the connection used at the time of it's creation
- each window CAN use an independent HF context (it's an option)
- each thread uses and independent HF context
and I may be forgetting things...
So, one thing you could do is try to open your restore window with eh USE instruction (that should close everything else), then from there, when the restore is finished, you can do a USE of your main window.
Best regards
Signaler
0
0
Rik
#5
Posté le 09 octobre 2017 - 10:44
Hello Fabrice,
Thank you for you response.
The USE instruction is not doing the trick.
With this new insight I can probably try and search for which element is giving these hiccup.
For now even commenting out the HOpenConnection(Thus not connecting at all) is not doing the trick, so the problem is probably somewhere deeper.
Thanks you very much, I will keep you guys updated.
Regards,
Rik
Signaler
0
0
Fabrice Harari
#6
Posté le 09 octobre 2017 - 19:54
Hi again
there is also the possibility of a connection defined in the analysis. If there is one, remove it.
Best regards
Signaler
0
0
Rik
#7
Posté le 10 octobre 2017 - 15:34
Hi Fabrice,
There is no connection defined in the project analysis.
Regards,
Rik
Signaler
0
0
Allard
#8
Posté le 11 octobre 2017 - 16:23
try
HRestoreBackup(MyBackupConnection,DataPath)
regards
Signaler
0
0
→ Revenir à WINDEV 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