I'm getting this error when browsing database objects in Excel through an ODBC connection: DataSource.Error: ODBC: ERROR [07006] [Oracle][ODBC]Restricted data type attribute violation. Any suggestions why this is happening?
It seems to happen with every database object, including a view that was created with "select 1 as x from dual". Database is 12.2.0.1, ODBC driver version is 32-bit 19.11, Excel is 32-bit. I've also tried with a 19c database.
This is from the ODBC trace log. I can't tell what the statement is running, but I have a hunch it's listing the column names and types for the object being viewed. There is a fragment of the statement that suggests it's hitting one of the *_synonyms views:
Microsoft.Mashu 6508-5540 ENTER SQLGetData
HSTMT 0x00D9D730
UWORD 7
SWORD -25 <SQL_C_SBIGINT>
PTR <unknown type>
SQLLEN 2048
SQLLEN * 0x003ADF70
Microsoft.Mashu 6508-5540 EXIT SQLGetData with return code -1 (SQL_ERROR)
HSTMT 0x00D9D730
UWORD 7
SWORD -25 <SQL_C_SBIGINT>
PTR <unknown type>
SQLLEN 2048
SQLLEN * 0x003ADF70
DIAG [07006] [Oracle][ODBC]Restricted data type attribute violation. (0)
Microsoft.Mashu 6508-5540 ENTER SQLGetDiagRecW
SQLSMALLINT 3 <SQL_HANDLE_STMT>
SQLHANDLE 0x00D9D730
SQLSMALLINT 1
SQLWCHAR * 0x003ADE5C
SQLINTEGER * 0x003ADF30
SQLWCHAR * 0x007E37E0
SQLSMALLINT 1024
SQLSMALLINT * 0x003ADF2C
Microsoft.Mashu 6508-5540 EXIT SQLGetDiagRecW with return code 0 (SQL_SUCCESS)
SQLSMALLINT 3 <SQL_HANDLE_STMT>
SQLHANDLE 0x00D9D730
SQLSMALLINT 1
SQLWCHAR * 0x003ADE5C [ 5] "07006"
SQLINTEGER * 0x003ADF30 (0)
SQLWCHAR * 0x007E37E0 [ 110] "[Oracle][ODBC]Restricted data type attribute violation.\ 0on.\ 0ULL AND SYNONYM_NAME='MY_VIEW' AND OWNER='MYSCHEMA"
SQLSMALLINT 1024
SQLSMALLINT * 0x003ADF2C (110)