| Issue 69: | Connect: pyodbc.Error: ('0', '[0] [nxDC (202) (SQLDriverConnectW)') | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
1. Install unixODBC 2.2.14 with psqlodbc-08_03_0400
2. create a data source and check that it can be accessed with isql
3. connect to the datasource with pyodbc 2.1.6
What is the expected output? What do you see instead?
Insetad of connecting to the data source I get a pyodbc.Error
exception in python at he connect(...) function call saying
[0] [nxDC (202) (SQLDriverConnectW)
What version of the product are you using? On what operating system?
I have Slackware Linux:
adrian@darkstar:~/packages/unixODBC-2.2.14$ uname -a
Linux darkstar 2.6.30 #1 Mon Jun 22 21:38:25 EEST 2009 i686 AMD Sempron(tm)
2200+ AuthenticAMD GNU/Linux
Please provide any additional information below.
I have compiled versions of unixODBC, psqlodbc, python2.6 and pyodbc
isql pikantBlue pikantBlue
works just fine and I can execute queries at the isql command prompt.
But when I write a python script and call
pyodbc.connect('DSN=pikantBlue;UID=pikantBlue;PWD=')
then I get the above error.
Also if I connect with pyodb instead of pyodbc (pyodbc is another python
module for access to ODBC drivers and their databases) than I can connect.
I also tried pyodbc on two other computers with Ubuntu and I get the same
problem. Can anyone please help ? I could not find the error with Google
Aug 27, 2009
#1
terminatorul@gmail.com
Sep 5, 2009
I find that if I use the ANSI version of the psqlodbc driver than I can connect successfully. Do you know why the Unicode driver won't work with pyodbc ?
Sep 5, 2009
The ANSI and Unicode functions are separate functions, so usually it means either the driver doesn't have the functions or there are bugs in one but not the other. Since it works for you, I'm going to close this out, but it is still searchable for others having the same issue. Thanks for reporting what you found. By the way, using the ANSI connect doesn't mean you can't read and write Unicode values, it just means it uses SQLDriverConnectA instead of SQLDriverConnectW. (Though some drivers do notice which you use and change their behavior.)
Status:
Done
Nov 21, 2010
(No comment was entered for this change.)
Status:
Complete
|