| 1017 | } |
| 1018 | |
| 1019 | SQLRETURN SQLSetStmtAttr(SQLHSTMT stmt, SQLINTEGER attribute, SQLPOINTER value_ptr, |
| 1020 | SQLINTEGER string_length) { |
| 1021 | ARROW_LOG(DEBUG) << "SQLSetStmtAttrW called with stmt: " << stmt |
| 1022 | << ", attribute: " << attribute << ", value_ptr: " << value_ptr |
| 1023 | << ", string_length: " << string_length; |
| 1024 | |
| 1025 | using ODBC::ODBCStatement; |
| 1026 | |
| 1027 | return ODBCStatement::ExecuteWithDiagnostics(stmt, SQL_ERROR, [=]() { |
| 1028 | ODBCStatement* statement = reinterpret_cast<ODBCStatement*>(stmt); |
| 1029 | |
| 1030 | bool is_unicode = true; |
| 1031 | |
| 1032 | statement->SetStmtAttr(attribute, value_ptr, string_length, is_unicode); |
| 1033 | |
| 1034 | return SQL_SUCCESS; |
| 1035 | }); |
| 1036 | } |
| 1037 | |
| 1038 | SQLRETURN SQLExecDirect(SQLHSTMT stmt, SQLWCHAR* query_text, SQLINTEGER text_length) { |
| 1039 | ARROW_LOG(DEBUG) << "SQLExecDirectW called with stmt: " << stmt |