Closed jabbera closed 1 year ago
All
set_attr can't be used to set strings. https://github.com/mkleehammer/pyodbc/blob/4829107c39fdd066b3d86ed6c226fb933b712eba/src/connection.cpp#L452-L458 This is becoming a problem for my use cases with the Apache Spark Samba ODBC driver which is used to access databricks sql sources.
Call the SQLSetConnectAttr function with SQL_ATTR_CREDENTIALS (122) as the attribute and the new connection string as the value. The connector will update the current connection string with the new access token.
This is the use case defined in the odbc specification: https://github.com/microsoft/ODBC-Specification/blob/master/ODBC%204.0.md#3251-sql_attr_credentials
similar: #505
Dunno how I missed that.
Environment
All
Issue
set_attr can't be used to set strings. https://github.com/mkleehammer/pyodbc/blob/4829107c39fdd066b3d86ed6c226fb933b712eba/src/connection.cpp#L452-L458 This is becoming a problem for my use cases with the Apache Spark Samba ODBC driver which is used to access databricks sql sources.
This is the use case defined in the odbc specification: https://github.com/microsoft/ODBC-Specification/blob/master/ODBC%204.0.md#3251-sql_attr_credentials