Bobspadger / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
0 stars 0 forks source link

pyodbc connect error #138

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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.

Original issue reported on code.google.com by feix...@platform.com on 18 Nov 2010 at 5:55

GoogleCodeExporter commented 9 years ago
may be api issues,
i use
python
>>> import pyodbc
>>> conn = 
pyodbc.connect("DRIVER={FreeTDS};SERVER=dns_or_ip_of_server;UID=username;PWD=pas
sword;DATABASE=database_name")

No errors and it is working!

Original comment by feix...@platform.com on 18 Nov 2010 at 6:18

GoogleCodeExporter commented 9 years ago
Great.  I'm closing this then.  Thanks for reporting back.

Original comment by mkleehammer on 20 Nov 2010 at 7:03

GoogleCodeExporter commented 9 years ago

Original comment by mkleehammer on 21 Nov 2010 at 4:43