LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how to detect fatal error with SQL TOOLKIT functions

I use the SQL Toolkit 2.0 with labwindows CVI. 7.1.1
My problem is how to detect cable disconnection (or database loss of connection ) when using SQL Toolkit functions.
 
DBConnect returns error code and its possible to dectect this problem.
But when a connexion is established, the DBRefreshParams() or DBExecutePreparedSql() functions for example return a FATAL RUN-TIME ERROR.
 
There is a solution to intercept the error code returned by this functions ?
( Or to avoid application interrupt ).
 
thanks.
 
 
0 Kudos
Message 1 of 3
(3,379 Views)
You could try pinging the server before executing critical functions: InetPing () function is available in cvi 7 in the Internet library.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(3,375 Views)
I always use this function at regular interval to detect a disconnection.
But the problem will be the same even if I call the inetPing() function before a call to the SQL Toolkit function.
A disconnection can occur just before the call an stop my software.
 
I call the NI Support to know if its a SQL library bug ...
0 Kudos
Message 3 of 3
(3,348 Views)