| 799 | } |
| 800 | |
| 801 | SQLRETURN SQLSetConnectAttr(SQLHDBC conn, SQLINTEGER attr, SQLPOINTER value_ptr, |
| 802 | SQLINTEGER value_len) { |
| 803 | ARROW_LOG(DEBUG) << "SQLSetConnectAttrW called with conn: " << conn |
| 804 | << ", attr: " << attr << ", value_ptr: " << value_ptr |
| 805 | << ", value_len: " << value_len; |
| 806 | |
| 807 | using ODBC::ODBCConnection; |
| 808 | |
| 809 | return ODBCConnection::ExecuteWithDiagnostics(conn, SQL_ERROR, [=]() { |
| 810 | const bool is_unicode = true; |
| 811 | ODBCConnection* connection = reinterpret_cast<ODBCConnection*>(conn); |
| 812 | connection->SetConnectAttr(attr, value_ptr, value_len, is_unicode); |
| 813 | return SQL_SUCCESS; |
| 814 | }); |
| 815 | } |
| 816 | |
| 817 | // Load properties from the given DSN. The properties loaded do _not_ overwrite existing |
| 818 | // entries in the properties. |