OK, I have to add more information.
First, my approach was to open MS Excel, then from there MS Query, and return the data to MS Query first, then close MS Query and return the data to Excel.
In this scenario I have now made a SQL query log on the MySQL server. The queries from MS Query look completely normal. But when I close MS Query, I get this:
Code: Select all
220226 0:57:24 139 Connect [email protected] on hai using TCP/IP
139 Query SET NAMES utf8mb4
139 Query SET character_set_results = NULL
139 Query SET SQL_AUTO_IS_NULL = 0
139 Query set @@sql_select_limit=DEFAULT
139 Query ODBC
What the heck? "ODBC" only instead of "SELECT ... FROM ..."? No wonder the server reports an invalid query.
But when I choose to NOT return the selected data to MS Query for preview, but instead to Excel directly, Excel crashes, and it crashes BEFORE sending a query to the server. The console output is this:
Code: Select all
01dc:fixme:ddeml:WDML_DataHandle2Global Unsupported format (c051) for data 002847CA, passing raw information
01dc:fixme:ddeml:WDML_DataHandle2Global Unsupported format (c051) for data 00284AE2, passing raw information
01f8:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
01fc:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
01fc:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
01fc:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
01fc:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
01fc:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
01fc:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
01fc:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
01fc:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
01fc:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
01fc:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
01fc:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
01fc:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
01fc:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
01fc:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
01fc:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
01fc:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
01fc:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
01fc:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
01fc:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
01fc:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
01fc:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
01fc:fixme:dbghelp:MiniDumpWriteDump NIY MiniDumpWithDataSegs
01fc:fixme:cryptasn:CRYPT_GetBuiltinDecoder Unsupported decoder for lpszStructType 1.3.6.1.4.1.311.2.1.4
01fc:fixme:cryptasn:CRYPT_GetBuiltinDecoder Unsupported decoder for lpszStructType 1.3.6.1.4.1.311.2.1.4
01fc:fixme:cryptasn:CRYPT_GetBuiltinDecoder Unsupported decoder for lpszStructType 1.3.6.1.4.1.311.2.1.4
01fc:fixme:cryptasn:CRYPT_GetBuiltinDecoder Unsupported decoder for lpszStructType 1.3.6.1.4.1.311.2.1.4
01fc:fixme:advapi:RegisterEventSourceW ((null),L"Microsoft Office 14"): stub
01fc:fixme:advapi:ReportEventW (CAFE4242,0x0001,0x0000,0x000003e8,00000000,0x0008,0x000000e4,2E0C2BAC,0260DAE4): stub
01fc:err:eventlog:ReportEventW L"excel.exe"
01fc:err:eventlog:ReportEventW L"14.0.6024.1000"
01fc:err:eventlog:ReportEventW L"4d83e607"
01fc:err:eventlog:ReportEventW L"excel.exe"
01fc:err:eventlog:ReportEventW L"0.0.0.0"
01fc:err:eventlog:ReportEventW L"4d83e607"
01fc:err:eventlog:ReportEventW L"0"
01fc:err:eventlog:ReportEventW L"000156ef"
01fc:fixme:advapi:DeregisterEventSource (CAFE4242) stub
01fc:fixme:richedit:editor_handle_message EM_SETMARGINS: stub
01fc:fixme:richedit:editor_handle_message EM_SETMARGINS: stub
Now to MS Access. When I open the ODBC data source for linking a table, Access sends this to the server:
Code: Select all
220226 1:12:52 141 Connect [email protected] on hai using TCP/IP
141 Query SET NAMES utf8mb4
141 Query SET character_set_results = NULL
141 Query SET SQL_AUTO_IS_NULL = 0
141 Query set @@sql_select_limit=DEFAULT
141 Query SELECT Config, nValue FROM MSysConf
141 Query SELECT TABLE_NAME, TABLE_COMMENT, TABLE_TYPE, TABLE_SCHEMA FROM ( SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = DATABASE() AND ( TABLE_TYPE='BASE TABLE' OR TABLE_TYPE='VIEW' ) ) TABLES
141 Query select database()
Which to me looks completely valid, but differs a little from the (working) MS Query approach, which sends this:
Code: Select all
220226 0:55:20 138 Connect [email protected] on hai using TCP/IP
138 Query SET NAMES utf8mb4
138 Query SET character_set_results = NULL
138 Query SET SQL_AUTO_IS_NULL = 0
138 Query select database()
138 Query SHOW DATABASES LIKE '%'
138 Query set @@sql_select_limit=DEFAULT
138 Query SELECT TABLE_NAME, TABLE_COMMENT, TABLE_TYPE, TABLE_SCHEMA FROM ( SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA LIKE 'hai' AND ( TABLE_TYPE='BASE TABLE' OR TABLE_TYPE='VIEW' ) ) TABLES
But valid or not, none of the database tables is visible in the MS Access dialog.