ABMorley / pypyodbc

Automatically exported from code.google.com/p/pypyodbc
0 stars 0 forks source link

Data source name not found on linux + unixodbc + as400 iseries driver #54

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Install pypyodbc version 1.3.3 on Ubuntu 12.04 under a Python 3.4.0 build
2. Install unixodbc
3. Install the i Series driver from IBM
4. Setup unixodb - `isql -v mydsn` works
5. Try `import pypyodbc; 
pypyodbc.connect("Driver={mydsn};System=the.as400;Uid=validuid;Pwd=validpw;")`

What is the expected output? What do you see instead?

Expected to see the result of the query, instead I got 
pypyodbc.Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name 
not found, and no default driver specified')

Original issue reported on code.google.com by wwer...@lwsi.com on 1 Oct 2014 at 4:07

GoogleCodeExporter commented 8 years ago
I thought maybe upgrading to Python 3.4.1 might solve the problem, but nope.

When I display `c_connectString.value` it shows b"D", but the result of 
UCS_buf(self.connectString) is basically 
'\x00'.join("Driver={mydsn}...').encode()

Not sure if that has any effect...

Original comment by wwer...@lwsi.com on 1 Oct 2014 at 4:25