Is there a fast way to see of the PC is connected to the network with the SQL-server, so he can access the SQL-database.
I have a client with a laptop, and sometimes he's connected to the wrong network, so he can't access the SQL-database.
I Open the the database this way
- Code: Select all Expand view RUN
- otmp = CREATEOBJECT( "ADODB.Recordset" )
otmp:cursortype :=1
otmp:cursorlocation :=3
otmp:locktype := 3
TRY
otmp:open(vCommando,ADO_SQL_Connectionstring)
CATCH oErr
Msgalert( "Fout bij het lezen van de gegevens!")
END TRY
It's working fine, but it take 45 seconds before I get the error-message.