Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-01036: illegal variable name/number .(cx_Oracle)

krishnabharatMay 11 2020 — edited May 12 2020

When I am trying to insert data into DB and i can see the above error when i am using below code.

Could you please suggest what else can be done.

Code:

list_to_remove=['Have you searched','similar question has already been posted']

dsn_tns = cx.makedsn(cred_test['HOST'], cred_test['PORT'], service_name=cred_test['SERVICE_NAME'])

conn = cx.connect(user=cred_test['USER'], password=cred_test['PASWRD'], dsn=dsn_tns)

cursor = conn.cursor()

cursor.prepare('INSERT INTO Table_name Col_name values (:0)')

cursor.executemany(None,list_to_remove)

conn.commit()

Comments
Post Details
Added on May 11 2020
7 comments
13,528 views