a cx_Oracle ORA-01036 problem

Miles miles_f at yahoo.com
Fri May 6 12:37:06 EDT 2005


Damjan wrote:
> I'm using Python 2.4, cx_Oracle-4.1 on Linux with Oracle instant client
> 10.1.0.3. This is the sql string:
> 
> SQL = """insert into D.D_NOTIFY values (:CARDREF, :BANKKEY, :OK1, :OK2 \
>         :DEBTEUR, :DEBTDEN, to_date(:INVOICE_DATE,'DD.MM.YY'),
>         to_date(:PAYMENT_DEADLINE,'DD.MM.YY'), :POINTS)"""
> 
> And I'm trying to execute it as:
>         c = db.cursor()
>         c.execute(SQL, CARDREF=id, BANKKEY=dc_kluc, OK1=okd, OK2=okc,                   
>           DEBTEUR=iznos_eur, DEBTDEN=iznos_mkd, INVOICE_DATE=datum_g,           
>           PAYMENT_DEADLINE=datum_d, POINTS=bodovi)
> 
> And I get an ORA-01036 exception.

Try using a variable name other than "id" for the CARDREF variable... say
"card_id".  id is a built in function name; I suspect your problem may be
that you are assiging that function to the variable rather than your intended
value...


Miles



More information about the Python-list mailing list