Oracle and Python

gfwinds at my-deja.com gfwinds at my-deja.com
Tue Sep 12 18:05:08 EDT 2000


I had a terrible time getting this module with
the below example to work in Python 1.6.  We
finally had success when we reinstalled 1.5
instead.  I don't know if anyone else has
experienced issues with this, but Python 1.5 just
seems to work better with this module.

Gayle


In article
<39AF904E.549B1E2C at VerizonWireless.com>,
  Bill Scherer <Bill.Scherer at VerizonWireless.com>
wrote:
> Philip Rodgers wrote:
> >
> > Does anyone have a good example of using
DCOracle?  I have compiled and
> > installed and tested fine but I get oci_curs
errors when I try to
> > execute("query");
>
> $ python
> >>> import DCOracle
> >>> db = DCOracle.Connect("uid/passwd at sid")
> >>> cursor = db.cursor()
> >>> cursor.execute("select distinct owner from
sys.all_tables")
> >>> results = cursor.fetchall()
> >>> cursor.close()
> >>> db.close()
> >>> print results
> [('SYS',), ('SYSTEM',)]
> >>> ^d
> $
>
> - Bill Scherer
>
>



Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list