[unixODBC-support] Multiple SQL_HANDLE_DBC handles from the same environment handle do not work with the Microsoft SQL Server Driver for Linux
David.Ritter at roguewave.com
Tue Apr 16 17:38:08 BST 2013
Hello Nick (and all),
Nick suggested that this was an issue that was addressed in unixODBC 2.3.1 and I can confirm that 2.3.1 does fix the issue I was seeing.
Thank you for your prompt reply and help,
From: unixodbc-support-bounces at mailman.unixodbc.org [mailto:unixodbc-support-bounces at mailman.unixodbc.org] On Behalf Of Nick Gorham
Sent: Tuesday, April 16, 2013 7:36 AM
To: Support for the unixODBC project
Subject: Re: [unixODBC-support] Multiple SQL_HANDLE_DBC handles from the same environment handle do not work with the Microsoft SQL Server Driver for Linux
On 16/04/13 15:07, David Ritter wrote:
> I am seeing a problem using multiple SQL_HANDLE_DBC handles off of a single environment handle when using the Microsoft SQL Server Driver for Linux. This same test case works correctly under Microsoft Windows, so I assumed it was an issue with the driver. I filed a support request with Microsoft and they indicated that they felt it was actually a bug in the driver manager.
> Has anyone else seen this behavior/issue?
> I am using the following OS:
> Red Hat Enterprise Linux 6.1 64-bit (2.6.32-131.0.15.el6.x86_64)
> My compiler is:
> gcc version 4.4.5 20110214 (Red Hat 4.4.5-6) (GCC)
> I am using unixODBC 2.3.0 (64-bit) and the SQL Server for Linux driver version 11.0.1790.0.
> I have attached the test case that I developed to demonstrate this. Please note you will need to update the test to use your database connection DSN and username.
> It can be built using the compilation line:
> g++ -M64 -I$ODBC/include -L$ODBC/lib -g -lodbc sqlgetdata.cpp
> I have also attached the tracing log generated by unixODBC.
> Please let me know if there is any other information I can provide.
> Thank you for any help anyone can provide, David Ritter
Well, for what its worth, it works fine with our (Easysoft) SQL Server driver. Though I did have to add a second SQLDisconnect at the end before you free the env handle. But your test was failing before that point. Attached log of it running. And you do get a error because you call SQLFetch after SQLMoreResults returns SQL_NO_DATA.
I would need a bit more to go on if its a driver manager problem.
More information about the unixODBC-support