Execute SQL against connection. Set error string if failed */
| 274 | |
| 275 | /* Execute SQL against connection. Set error string if failed */ |
| 276 | static 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 */ |
| 296 | static int columnName(msODBCconn *conn, int index, char *buffer, int bufferLength) |
no test coverage detected