Subscribe to this thread
Home - General / All posts - Excel Manifold ODBC ERROR
davebic14 post(s)
#07-Mar-23 15:51

Please bear with me because I believe this is more of a Excel question than a Manifold question. I'm hoping that someone has has a similar experience.

I am attempting to connect to a Manifold database in Desktop Excel 365 via ODBC. Failed connection, Error message as follows.

Details: "ODBC: ERROR [IM004] [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed"

This error message has been googled and none of the resolution approaches seem to apply.

I know the the ODBC connection works because have have opened the same Manifold dataset in both MS Access and Tibco Spotfire. This suggests the error lies in Excel. I have used this Manifold ODBC many times without issue. Troubleshooting, I have tried different Excel Trust settings and running a repair on SQL_HANDLE_ENV.

Excel will connect to an Access DB with via ODBC but will not connect to a Manifold or a MySQL DB. MySQL throws the same error when attempting to connect to Excel via ODBC.

Specifics: Windows 11, Manifold and Excel are 64 bit & Manifold ODBC driver is installed

I truly appreciate and help or guidance that this community can provide.


10,348 post(s)
#09-Mar-23 08:49

The error suggests that our driver fails to initialize for some reason. We'll try to reproduce the issue.

Thanks for the note, the details really help.

davebic14 post(s)
#12-Mar-23 03:33

Any progress or thoughts on this error? Thanks.


10,348 post(s)
#17-Mar-23 13:42

Well, yes. We have not been able to reproduce the issue so far, but we only tried the most straightforward things plus we did not replicate your configuration exactly, so maybe we will still be able to reproduce it. It does look like something on part of Excel. As in, nothing for us to fix.

Let's try two workarounds:

Try connecting from Excel to Manifold not directly via ODBC, but through OLE DB. That is: Excel -> add OLE DB data source for the following provider: Microsoft OLE DB Provider for ODBC Drivers -> connect to the Manifold ODBC driver.

Try adding a link to Manifold to an Access database (add a couple of pass-through queries), then connect from Excel to that database.

davebic14 post(s)
#17-Mar-23 15:30

Thank you Adam. Just a few more details if you want to continue to work on the issue.

1. I was able to open the Manifold ODBC file smoothly in Power BI in addition to Spotfire and Access

2. I posted on Microsoft's Q&A board, the response to my issue was:

"Based on the error message, the ODBC connected to the GIS databas is not compatible.

I suggest you try to update the ODBC driver and check the result."

3.I was able to recreate the same original error message on a different machine running Excel 365 on Windows 10 rather than 11.

Details: "ODBC: ERROR [IM004] [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed"

4. The Access work around seems quite arduous for what should be a simple ODBC connection.

5. The OLE DB work around produced this error message.

Maybe there are some other members of this forum that would like to try to connect to Excel 365 via ODBC?

Thanks again for your efforts.


10,348 post(s)
#20-Mar-23 11:22

This really helps.

Especially, item 5 -- apparently Excel 365 connects to OLE DB / ODBC via .NET. This is a bit of a surprise, normally apps like that use ODBC through native code (I guess this is why other apps that you mention can connect just fine, they are connecting 'normally'). But this does allow us to test better.

We'll run more tests, thanks.

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.