FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
check Microsoft SQL connection
check Microsoft SQL connection
Débuté par Andrea Fortune, 24 fév. 2019 09:29 - 1 réponse
Connectez-vous…
Andrea Fortune
#1
Posté le 24 février 2019 - 09:29
Hello,
I'm working with an external Ms SQL server in LAN network via OLEDB connection.
The configuration works good and I'm able to read that database using queries with windev.
The problem is when the server is shut down, if the client execute a query windev crash's.
I want to avoid this, checking if the connection is working it can execute the query.
I need
1) something to check Hconnection status (I want to use a green icon if the connection is established)
2) something to use set a timeout (I tried to use something in the guide but I doesn't work)
Thanks
Signaler
0
0
Tassilo
#2
Posté le 09 mars 2019 - 15:49
Hi,
I always check the connection status with a procedure:
Procedure
GetConnectiontoSql
(
)
n
Conn
is boolean
n
Conn
=
SQLConnect
(
gsserver
,
""
,
""
,
gsdb
,
"OLEDB"
,
"SQLOLEDB"
,
"Trusted_Connection=YES"
)
IF
n
Conn
=
False
THEN
SQLInfo
(
)
Error
(
"The connection to the data source "
+
gsdb
+
" failed."
+
CR
+
"Error code: "
+
SQL.Error
)
END
RESULT
n
Conn
Now you can set an icon.
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