[unixODBC-support] Multiple SQL_HANDLE_DBC handles from the same environment handle do not work with the Microsoft SQL Server Driver for Linux
nick at lurcher.org
Tue Apr 16 15:36:18 BST 2013
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4858 bytes
Desc: not available
More information about the unixODBC-support