FirebirdSQL/firebird-odbc-driver

Error: The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr)

fdcastel opened this issue · 7 comments

Using odbc2parquet with the latest release of Firebird ODBC driver (3.0.0.11) results in the following error:

State: 01000, Native error: 0, Message: [Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr).

What is the ODBC specification version that this driver implements?

It seems the latest version is 4.0, which dates back to around 2017 (according to this repository).

Hi @fdcastel

This driver implements 3.0 ODBC spec version (SQL_OV_ODBC3). 4.0 is not supported now.
As I mentioned in the release notes, this version is adapted to the new FB3.0+ API (the main goal) and contains a set of patches, fixes & refactoring. However, the supported version of the ODBC specification remains the same (3.0).
The 4.0 ODBC support requires а much more extensive code rewrite. Perhaps someday we will do this, but we are not planning on it yet.

Regards

Thanks @irodushka for the information.

odbc2parquet requires ODBC Specification 3.8 (with the author mentioning that it could be compatible down to 3.5).

Would it be possible to support 3.8 or even 3.5?

According to SQLSetEnvAttr documentation the only difference between SQL_OV_ODBC3_80 and SQL_OV_ODBC3 is that the driver supports C Data Types in ODBC.

Update: It is not the only one. This article contains more changes between versions 3.5 and 3.8.

P.S.: It's hard to find detailed information about each specification version, but I'm assuming that SQL_OV_ODBC3 corresponds to what Microsoft docs call the '3.5' specification.

Hi @fdcastel

SQL_OV_ODBC3 corresponds to 3.* specs up to 3.5 (3.0 & 3.5).
SQL_OV_ODBC3_80 corresponds to 3.8 spec.
SQL_OV_ODBC4 -> 4.0 spec (a new C header "sqlext.h" needed).

FB driver 3.0.0.11 definitely follows the 3.0 and 3.5 specifications, the only difference between 3.0 and 3.5 is Unicode support.
But what about 3.80 - nope, let alone version 4.0)

Can you please explain to me what your task is? Is it absolutely necessary to use the odbc2parquet utility?.. Maybe asking the odbc2parquet developers to support the 3.* ODBC spec is a more optimal way to solve this problem? Or maybe you need some sql data types that are not supported in 3.* (those С data types)? I would be glad to help you, but I need more details.

I'm afraid that updating our ODBC driver even to 3.80 is clearly not a quick way.

It would be helpful if you could post the entire output to the command line, while running odbc2parquet with the -vvv flag to trigger very verbose output.

Are you running on Windows? If so, what version?

Sorry, I asked this in the wrong issue.

@fdcastel
Btw this message is just a warning) The utility posts it but it works and generates the parquet file.

Thanks, guys, for the support!

@irodushka you are right about the warning. The real problem was another error (which I mistakenly ignored due the warning of ODBC specification message).

About your other questions:

Can you please explain to me what your task is?

Just dump data to a .parquet file. 😉

Is it absolutely necessary to use the odbc2parquet utility?

No. But I presume it will be faster than the current system I'm using.
Also, if you have any, I welcome suggestions.

asking the odbc2parquet developers to support the 3.* ODBC spec is a more optimal way to solve this problem?

Indeed. Actually, that's exactly what I did. 😄

And @pacman82 kindly just released a new version of odbc2parquet that requires ODBC 3.5, which fixed the warning.

We can close this issue now.