FOROS PROFESIONALES
WINDEV
,
WEBDEV
y
WINDEV Mobile
Inicio
|
Mensajes recientes
|
Conéctese...
|
Desconectar
|
Español
Inicio
→
WINDEV 2024
→
check Microsoft SQL connection
check Microsoft SQL connection
Iniciado por Andrea Fortune, 24,feb. 2019 09:29 - 1 respuesta
Conéctese…
Andrea Fortune
#1
Publicado el 24,febrero 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
Informar
0
0
Tassilo
#2
Publicado el 09,marzo 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.
Informar
0
0
→ Volver a WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versiones precedentes)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Búsqueda Tipo
Sólo temas
Todos los mensajes
Periodo Buscar
Cualquier fecha
Última hora
Última 24 horas
Última semana
Último mes
Último año
Cancelar
Vista previa del mensaje
Añadiendo una imagen
Importar una imagen desde una URL
Enviar una imagen desde un archivo de su disco
Arrastrar un archivo o click en "Examinar..."
o
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto