MCPcopy Index your code
hub / github.com/MapServer/MapServer / msMSSQL2008CloseConnection

Function msMSSQL2008CloseConnection

mapmssql2008.c:193–217  ·  view source on GitHub ↗

Close connection and handles */

Source from the content-addressed store, hash-verified

191
192/* Close connection and handles */
193static 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 */
220static void setConnError(msODBCconn *conn)

Callers 1

msMSSQL2008LayerOpenFunction · 0.85

Calls 1

msFreeFunction · 0.85

Tested by

no test coverage detected