| 1071 | } |
| 1072 | |
| 1073 | SQLRETURN SQLExecute(SQLHSTMT stmt) { |
| 1074 | ARROW_LOG(DEBUG) << "SQLExecute called with stmt: " << stmt; |
| 1075 | |
| 1076 | using ODBC::ODBCStatement; |
| 1077 | // The driver is built to handle SELECT statements only. |
| 1078 | return ODBCStatement::ExecuteWithDiagnostics(stmt, SQL_ERROR, [=]() { |
| 1079 | ODBCStatement* statement = reinterpret_cast<ODBCStatement*>(stmt); |
| 1080 | |
| 1081 | statement->ExecutePrepared(); |
| 1082 | |
| 1083 | return SQL_SUCCESS; |
| 1084 | }); |
| 1085 | } |
| 1086 | |
| 1087 | SQLRETURN SQLFetch(SQLHSTMT stmt) { |
| 1088 | ARROW_LOG(DEBUG) << "SQLFetch called with stmt: " << stmt; |