-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pyodbc v5 Informix SqlDriverConnect Error #1392
Comments
It would be helpful if you could create ODBC trace logs when calling |
I've been having the same problem for a while, attaching the ODBC trace log here. It's a simple Does it contain anything useful? I was trying to replicate the issue directly in C code, with |
Here's the trace log for Pyodbc 4.0.39: It seems actually that No idea why |
Hi @asser, first thank you for Debugging that problem! Did you use the same Informix Client? @gordthompson is it possible to do a Bugfix on that? Would be really great! Wish you a nice year! |
@PyodbcUnix Yes, both of these are with CSDK 4.50.FC11. According to Informix' own documentation, Ref. https://www.ibm.com/docs/en/informix-servers/15.0.0?topic=unicode-supported-functions I just now noticed they have a new CSDK 15.0.0 out as of Nov 19, I'll give that a try and see if it makes a difference. |
Hi @asser can you try to add this in the odbc.ini or if there is already an ODBC section the following: [ODBC] Please also try to change UCS-2 to UCS-4 after test fail. If there already was this UNICODE Parameter then also try to comment out with ; because then default is UTF-8 BG |
@PyodbcUnix Yes, it's already set to I've opened a support request now with our Informix supplier, hopefully they can help. I'll report back. At this point I believe it's more of a driver issue or maybe unixODBC, causing |
Heard back from our supplier, unfortunately their support don't want to help out since they don't provide the Informix DB to us directly. A bit disappointing, even if it makes sense (their product is a package/application backed by Informix). I don't have other ways of raising the issue with IBM, but if anybody does it would be good :) |
Hi @asser, Oh thats unfortunately not good. But in odbcinst.ini you also did the tests in odbc.ini without the option in odbcinst.ini? Maybe we have to change the wording of the connection string. I dont know. Im going crazy... BG |
@gordthompson @mkleehammer @keitherskine i think there are more Environment or driver issues with the Connect W functions. Would it be possible that you add the ANSI again like it was in pyodbc 4.x.x? Thanks for your help! BG |
Sorry I didn't follow up on this - I think I had the option in odbcinst.ini at the same time yes. I'll see if I can try it without. I got inspired to try out some C code today, and found out how to directly link against the Informix libraries without going through unixODBC. And it seems that:
works, while:
does not work ("economi" is the DSN I configured in odbc.ini). So the problem might then be in the encoding of the connection string passed to the driver? I have no idea how unixODBC handles this, or if it's possible to control without modifying unixODBC. Any ideas? I'm happy to try out anything, I'm not sure where to go from here, except see if I can get connect to work linking against unixODBC and trying different string encoding (but need to read up on some more code first) ;-) |
Hi, @asser i also tried multiple different settings and strings but unfortunately failed. BG |
Thanks for following up on it so quickly! It's not a big issue for me, at the moment we're happily using pyodbc 4.0.39 anyway. I'll probably dive some more into it later to satisfy my own curiosity :) |
Yeah its not a big issue now but in 2027 there is no support for python 3.11 anymore... |
Ok, this was a bit interesting. I messed around with unixODBC and built a local copy with This makes
As in it connects successfully to Informix.
So there seems to be some mismatch between the type definition of pyodbc didn't like my newly built library at all, and returned an error padded with \x00:
To be fair, I didn't yet recompile pyodbc against my modified unixODBC, which will be the next step when I return to this. |
I suppose at this point I should raise the issue with unixODBC ;) |
Hi @asser Wow cool you are more intelligent than me :D But why do you have to change the Compile from pyodbc? It only calls the driver Manager. BG |
Environment
Issue
Hello together,
First i want to thank you for providing this cool package!
I updated my System to pyodbc 5.2.0 and now i get back the error SQLDriverConnect.w -11060 SQLError.
With pyodbc 4.0.39 everything works fine.
Hope you can help me...
The text was updated successfully, but these errors were encountered: