adodb has no attribute connect

R

Rahul

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

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

The same is also not working from python console

Please guide me through this.
 
D

Diez B. Roggisch

Rahul said:
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
 
R

Rahul

Rahul said:
Hello all,
I have to access data from database usingadodbso I did

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
developedadodb-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

Thank you Diez

I think this is very useful for me to change my mind and get shifted
to DB-API.

I will try to work on it.

Rahul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,216
Latest member
topweb3twitterchannels

Latest Threads

Top