FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
SQL server with OLE DB access, how to reconnect
SQL server with OLE DB access, how to reconnect
Débuté par Sasha, 16 mar. 2017 16:32 - Aucune réponse
Connectez-vous…
Sasha
#1
Membre enregistré
1 message
Posté le 16 mars 2017 - 16:32
Greetings everyone,
is there an easy way to make WD try reconnect when a physical connection to a Db is lost?
I have next situation. I'm using OLEDB to connect to an SQL server db. When a connection problem occurs, WD throws an exception, which I'm able to trap. But, when I try to close the connection (declared by programming) , and reopen it, even if there's still no connection HOpenConnection will return True !? It seems that this approach won’t work.
Now, I did try declaring a new connection, in which case, HopenConnection would act predictably (it would try opening, and after a while return False value). Although it could work, I would like to avoid this approach, because the code within whole application relies upon using initial connection defined as a global object.
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