adodb has no attribute connect

Diez B. Roggisch deets at nospam.web.de
Mon Feb 9 19:01:59 EST 2009


Rahul schrieb:
> Hello all,
> 
> I have to access data from database using adodb so I did
> 
> Import adodb
> Conn=adodb.NewADOConnection("odbc")
> 
> Upto this it works properly but when I say

It does not. It returns None, thus the following error you see.

> Conn.Connect("","","")
> 
> It gives error as
> 
> [Attributrerror]: Object Nonetype has no attribute Connect.
> 
> I have Red Hat Enterprise Linux 4
> Python 2.5
> Mod_python 3.3.1


According to the docs on the (very old and seemingly not actively 
developed adodb-site), "odbc" needs the Python windows extensions. As 
you are on redheat, I have difficulties believing you make these work.

Maybe mxodbc works? Or even better, ditch that ado-stuff and connect 
directly to your database. Python's DB-API is better I guess, no need 
for this attempt at mimicking windows APIs.

Diez



More information about the Python-list mailing list