| 1179 | } |
| 1180 | |
| 1181 | SQLRETURN SQLBindCol(SQLHSTMT stmt, SQLUSMALLINT record_number, SQLSMALLINT c_type, |
| 1182 | SQLPOINTER data_ptr, SQLLEN buffer_length, SQLLEN* indicator_ptr) { |
| 1183 | ARROW_LOG(DEBUG) << "SQLBindCol called with stmt: " << stmt |
| 1184 | << ", record_number: " << record_number << ", c_type: " << c_type |
| 1185 | << ", data_ptr: " << data_ptr << ", buffer_length: " << buffer_length |
| 1186 | << ", indicator_ptr: " << static_cast<const void*>(indicator_ptr); |
| 1187 | |
| 1188 | using ODBC::ODBCDescriptor; |
| 1189 | using ODBC::ODBCStatement; |
| 1190 | return ODBCStatement::ExecuteWithDiagnostics(stmt, SQL_ERROR, [=]() { |
| 1191 | // GH-47021 TODO: implement driver to return indicator value when data pointer is null |
| 1192 | ODBCStatement* statement = reinterpret_cast<ODBCStatement*>(stmt); |
| 1193 | ODBCDescriptor* ard = statement->GetARD(); |
| 1194 | ard->BindCol(record_number, c_type, data_ptr, buffer_length, indicator_ptr); |
| 1195 | return SQL_SUCCESS; |
| 1196 | }); |
| 1197 | } |
| 1198 | |
| 1199 | SQLRETURN SQLCloseCursor(SQLHSTMT stmt) { |
| 1200 | ARROW_LOG(DEBUG) << "SQLCloseCursor called with stmt: " << stmt; |