MCPcopy Create free account
hub / github.com/MapServer/MapServer / executeSQL

Function executeSQL

mapmssql2008.c:276–293  ·  view source on GitHub ↗

Execute SQL against connection. Set error string if failed */

Source from the content-addressed store, hash-verified

274
275/* Execute SQL against connection. Set error string if failed */
276static int executeSQL(msODBCconn *conn, const char * sql)
277{
278 SQLRETURN rc;
279
280 SQLCloseCursor(conn->hstmt);
281
282 rc = SQLExecDirect(conn->hstmt, (SQLCHAR *) sql, SQL_NTS);
283
284 if (rc == SQL_SUCCESS || rc == SQL_SUCCESS_WITH_INFO)
285 {
286 return 1;
287 }
288 else
289 {
290 setStmntError(conn);
291 return 0;
292 }
293}
294
295/* Get columns name from query results */
296static int columnName(msODBCconn *conn, int index, char *buffer, int bufferLength)

Callers 4

prepare_databaseFunction · 0.85
msMSSQL2008LayerGetShapeFunction · 0.85
msMSSQL2008LayerGetItemsFunction · 0.85

Calls 1

setStmntErrorFunction · 0.85

Tested by

no test coverage detected