Applies To: |
|
Summary: |
How do I know if an SQL connection is offline or online. |
Solution: |
First, check that SQL server is added in
the ODBC connections in control panel.
You can use the below Cicode to test the SQL server connections. /*Test an SQL server Connection, Using Microsoft ODBC Connections*/ /*continuously test connection by looping */ /*prompts an error message when connection is lost*/
INT hSQL; WHILE hSQL <>-1 DO hSQL = SQLConnect("DSN=SQL Test"); END IF hSQL = -1 THEN Message("Error", SQLErrMsg(), 48); END SQLDisconnect(hSQL); END |
Keywords: |
SQL,connection, SQL server,SQL connection |
Related Links
Attachments