| Issue 138: | pyodbc connect error | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
1. install unixodbc, pyodbc and config odbc.ini, odbcinst.ini
2. use isql test odbc connection
# isql -v VerticaDSN
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> quit
3. use pyodbc conect db
# python
Python 2.4.3 (#1, Nov 11 2010, 13:30:19)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyodbc
>>> cnxn = pyodbc.connect('DSN=VerticaDSN;UID=pa8;PWD=pa8')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
<type 'instance'>: ('0', '[0] [unixODBC]C (0) (SQLDriverConnectW)')
>>>
What is the expected output? What do you see instead?
cnxn = pyodbc.connect('DSN=VerticaDSN;UID=pa8;PWD=pa8')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
<type 'instance'>: ('0', '[0] [unixODBC]C (0) (SQLDriverConnectW)')
>>>
What version of the product are you using? On what operating system?
pyodbc-2.0.58
unixodbc 2.3.0
Please provide any additional information below.
Nov 20, 2010
Great. I'm closing this then. Thanks for reporting back.
Status:
Invalid
Nov 21, 2010
(No comment was entered for this change.)
Status:
NoFix
|
may be api issues, i use python >>> import pyodbc >>> conn = pyodbc.connect("DRIVER={FreeTDS};SERVER=dns_or_ip_of_server;UID=username;PWD=password;DATABASE=database_name") No errors and it is working!