Oracle and Python

Bill Scherer Bill.Scherer at VerizonWireless.com
Fri Sep 1 07:17:34 EDT 2000


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




More information about the Python-list mailing list