Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 8 Monaten, 2 Wochen
Letzter Beitrag:
vor 8 Monaten, 1 Woche
Beteiligte Autoren:
Rik, Fabrice Harari, Allard, Walter Dieltjens


Startbeitrag von Rik am 07.10.2017 18: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


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!




Make sure the HFCC program is closed and try again

von Walter Dieltjens - am 08.10.2017 12:15
Hello Walter,

Thank you for your fast response.
That was my first test case, but didnt help either.


von Rik - am 08.10.2017 14:35
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

von Fabrice Harari - am 08.10.2017 21:06
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.


von Rik - am 09.10.2017 08:44
Hi again

there is also the possibility of a connection defined in the analysis. If there is one, remove it.

Best regards

von Fabrice Harari - am 09.10.2017 17:54
Hi Fabrice,

There is no connection defined in the project analysis.


von Rik - am 10.10.2017 13:34



von Allard - am 11.10.2017 14:23
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.