...
- It is not connected
- Communication socket error or disconnection from the server-side
- If a previously disconnected connection was not detected (if the connection was previously disconnected)
- If it is disconnected by timeout
There are Query Timeout, Fetch Timeout, UTrans Timeout, and Idle Timeout. In the case of Query Timeout, the connection is not disconnected, but in all other cases, the connection is disconnected. - When the DB Server is shutdown
- If the connection is not possible because the DB server is shutdown (Connect failure)
...
In case of not connecter or previously disconnected
No Format [APRE*C/C++] ==================================================== sqlca STRUCTURE .sqlcode [-2] (SQL_ERROR) .sqlerrm.sqlerrmc The connection does not exist. (Name:default connection) SQLCODE [-2] SQLSTATE ["08003"] ==================================================== [SQLCLI/ODBC] 1. In case of haven't connected ==================================================== return value [-2] SQLError(env,dbc,stmt,state,err,msg,msgMax,msgLength) error state (state) [""] error number (err) [0] in Hex(0) error message (msg) [ ?] ==================================================== 2. In case of disconnected before ==================================================== return value [-1] (SQL_ERROR) SQLError(env,dbc,stmt,state,err,msg,msgMax,msgLength) error state (state) ["08003"] error number (err) [331830] in Hex(51036) error message (msg) [Connection does not exist (err8)] ====================================================
In case of the connection is disconnected (the server disconnection or a network error)
No Format [APRE*C/C++] ==================================================== sqlca STRUCTURE .sqlcode [-1] .sqlerrm.sqlerrmc [Communication link failure('errno')] SQLCODE [-331843] in Hex(51043) SQLSTATE ["08S01"] ==================================================== [SQLCLI/ODBC] ==================================================== return value [-1] SQLError(env,dbc,stmt,state,err,msg,msgMax,msgLength) error state (state) ["08S01"] error number (err) [331843] in Hex(51043) error message (msg) [Communication link failure('errno')] ====================================================
In case of the query was executed again without detecting that the connection was previously disconnected.
No Format [APRE*C/C++] ==================================================== sqlca STRUCTURE .sqlcode [-1] .sqlerrm.sqlerrmc [Connection does not exist (err11)] SQLCODE [-1] SQLSTATE ["08003"] ==================================================== [SQLCLI/ODBC] ==================================================== return value [-1] SQLError(env,dbc,stmt,state,err,msg,msgMax,msgLength) error state (state) ["08003"] error number (err) [331830] in Hex(51036) error message (msg) [Connection does not exist (err8)] ====================================================
In case of disconnected disconnection by Timeout
Fetch Timeout, UTrans Timeout, Idle Timeout all return the same error. (Timeout is recorded in altibase_boot.log.)No Format [APRE*C/C++] ==================================================== sqlca STRUCTURE .sqlcode [-1] .sqlerrm.sqlerrmc [Communication link failure(131)] SQLCODE [-331843] in Hex(51043) SQLSTATE ["08S01"] ==================================================== [SQLCLI/ODBC] ==================================================== return value [-1] SQLError(env,dbc,stmt,state,err,msg,msgMax,msgLength) error state (state) ["08S01"] error number (err) [331843] in Hex(51043) error message (msg) [Communication link failure(131)] ====================================================
In case of the DB server is shutdown
No Format [APRE*C/C++] ==================================================== sqlca STRUCTURE .sqlcode [-1] .sqlerrm.sqlerrmc [Communication link failure(131)] SQLCODE [-331843] in Hex(51043) SQLSTATE ["08S01"] ==================================================== [SQLCLI/ODBC] ==================================================== return value [-1] SQLError(env,dbc,stmt,state,err,msg,msgMax,msgLength) error state (state) ["08S01"] error number (err) [331843] in Hex(51043) error message (msg) [Communication link failure(131)] ====================================================
Connection failure
No Format [APRE*C/C++] ==================================================== sqlca STRUCTURE .sqlcode [-1] .sqlerrm.sqlerrmc [Client unable to establish connection] SQLCODE [-327730] [50032] SQLSTATE [08001] ==================================================== [SQLCLI/ODBC] ==================================================== return value [-1] SQLError(env,dbc,stmt,state,err,msg,msgMax,msgLength) error state (state) [08001] error number (err) [327730] in Hex(50032) error message (msg) [Client unable to establish connection] ====================================================
...
- - SQLSTATE(state) ["08001"] SQLCODE [1(0x01)] errno [32770(0x050032)]
Connection failure - - SQLSTATE(state) ["08003"] SQLCODE(errno) [331830(0x051036)]
In case of not connected (after disconnection)
In case the connection is already disconnected - - SQLSTATE(state) ["08S01"] SQLCODE(errno) [331843(0x051043)]
Socket disconnection
In case of interruption due to timeout
In case of the server being shutdown