Close connection and handles */
| 191 | |
| 192 | /* Close connection and handles */ |
| 193 | static void msMSSQL2008CloseConnection(void *conn_handle) |
| 194 | { |
| 195 | msODBCconn * conn = (msODBCconn *) conn_handle; |
| 196 | |
| 197 | if (!conn) |
| 198 | { |
| 199 | return; |
| 200 | } |
| 201 | |
| 202 | if (conn->hstmt) |
| 203 | { |
| 204 | SQLFreeHandle(SQL_HANDLE_STMT, conn->hstmt); |
| 205 | } |
| 206 | if (conn->hdbc) |
| 207 | { |
| 208 | SQLDisconnect(conn->hdbc); |
| 209 | SQLFreeHandle(SQL_HANDLE_DBC, conn->hdbc); |
| 210 | } |
| 211 | if (conn->henv) |
| 212 | { |
| 213 | SQLFreeHandle(SQL_HANDLE_ENV, conn->henv); |
| 214 | } |
| 215 | |
| 216 | msFree(conn); |
| 217 | } |
| 218 | |
| 219 | /* Set the error string for the connection */ |
| 220 | static void setConnError(msODBCconn *conn) |
no test coverage detected