message: ODBC: get SQL_ATTR_METADATA_ID connection attribute.
diff: #include "duckdb_odbc.hpp"
  #include "driver.hpp"
  +#include "odbc_utils.hpp"
  +using duckdb::OdbcUtils;
  using std::ptrdiff_t;
  SQLRETURN SQL_API SQLGetConnectAttr(SQLHDBC connection_handle, SQLINTEGER attribute, SQLPOINTER value_ptr,
  @@ -34,6 +36,9 @@ SQLRETURN SQL_API SQLSetConnectAttr(SQLHDBC connection_handle, SQLINTEGER attrib
  dbc->autocommit = false;
  dbc->conn->SetAutoCommit(false);
  return SQL_SUCCESS;
  + case SQL_ATTR_METADATA_ID:
  + dbc->sql_attr_metadata_id = *((SQLUINTEGER *)value_ptr);
  + return SQL_SUCCESS;
  default:
  return SQL_ERROR;
  }
  @@ -49,7 +54,7 @@ SQLRETURN SQL_API SQLGetInfo(SQLHDBC connection_handle, SQLUSMALLINT info_type,
  // TODO more from fun list
  // https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/sqlgetinfo-function?view=sql-server-ver15
  -
  + return duckdb::WithConnection(connection_handle, [&](duckdb::OdbcHandleDbc *dbc) -> SQLRETURN {
  switch (info_type) {
  case SQL_DRIVER_NAME:
  case SQL_DBMS_NAME: {
  @@ -69,7 +74,8 @@ SQLRETURN SQL_API SQLGetInfo(SQLHDBC connection_handle, SQLUSMALLINT info_type,
  duckdb::FreeHandle(SQL_HANDLE_STMT, stmt);
  return SQL_ERROR;
  }
  - if (!SQL_SUCCEEDED(SQLExecDirect(stmt, (SQLCHAR *)"SELECT library_version FROM pragma_version()", SQL_NTS))) {
  + if (!SQL_SUCCEEDED(
  + SQLExecDirect(stmt, (SQLCHAR *)"SELECT library_version FROM pragma_version()", SQL_NTS))) {
  duckdb::FreeHandle(SQL_HANDLE_STMT, stmt);
  return SQL_ERROR;
  }
  @@ -122,9 +128,18 @@ SQLRETURN SQL_API SQLGetInfo(SQLHDBC connection_handle, SQLUSMALLINT info_type,
  mask = (SQL_GD_ANY_COLUMN | SQL_GD_ANY_ORDER | SQL_GD_BOUND | SQL_GD_BLOCK);
  duckdb::Store<SQLUINTEGER>(mask, (duckdb::data_ptr_t)info_value_ptr);
  return SQL_SUCCESS;
  + case SQL_IDENTIFIER_QUOTE_CHAR:
  + duckdb::OdbcUtils::WriteString("\"", (SQLCHAR *)info_value_ptr, buffer_length, string_length_ptr);
  + return SQL_SUCCESS;
  + case SQL_TABLE_TERM: {
  + const string str_table("table");
  + return OdbcUtils::SetStringAndLength(dbc->error_messages, str_table, info_value_ptr, buffer_length,
  + string_length_ptr);
  + }
  default:
  return SQL_ERROR;
  }
  + });
  }
  SQLRETURN SQL_API SQLEndTran(SQLSMALLINT handle_type, SQLHANDLE handle, SQLSMALLINT completion_type) {
  