[DB-SIG] DCOracle

paul@boddie.net paul@boddie.net
14 Feb 2002 17:25:36 -0000


"Hugh Frater" <H.E.W.Frater@cs.cf.ac.uk> wrote:
>
>I can import oci_ with:
>import oci_

First, I would seriously doubt that you should be importing something like 
oci_, although I've never used DCOracle, unless it's a rebranded form of the 
old oracledb module. (I don't think it is, though.)

Can you not import something like DCOracle instead?

>and it works fine. I can also connect to oracel with my 
>username/password fine but when I try to create a new cursor object 
>(c = db.cursor()), I get this error:
>Attribut error: 'Connection' object has no attribute 'Cursor'

You may have to be more specific. How did you get the connection? It seems like 
you're accessing some low-level implementation of the interface rather than the 
DB-API objects. If you can import DCOracle, what do you see when you do the 
following?

  dir(DCOracle)

Can you find a function called "connect", "Connect" or even "DCOracle"? This 
should, when used with the username and password parameters, return a 
connection object which actually has a method called "cursor". See:

  http://www.python.org/topics/database/DatabaseAPI-2.0.html

Hope this helps!

Paul

-- 
Get your firstname@lastname email at http://Nameplanet.com/?su