Link to home
Start Free TrialLog in
Avatar of bucebuce
bucebuce

asked on

Connecting Oracle using Python module cx_Oracle

Hi,

I am using cx_oracle module to connect Oracle DB 11g using python script. Getting error in the prepare statement.

Code Snippet:

DELETE_USAGE_STATISTICS_SQL = \
    '''
    delete from usage_statistics
        where
            (usage_statistics_date = :p1)
    '''

c = self.dbs.prepare(DELETE_USAGE_STATISTICS_SQL)

Error:
calculate_statistics.py", line 308, in calculate_statistics
    c = self.dbs.prepare(DELETE_USAGE_STATISTICS_SQL)
TypeError: prepare() takes no arguments (1 given)

Platform: SuSE Linux 11.3 x86_64
Python: 2.7
Oracle: 11gR2
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial