插入oracle数据报ora-01036错误:非法的变量名/编号

Love_Python 发布于 2014/04/30 17:12
阅读 1K+
收藏 0

大家好:

我在用python插入数据时,报ora-01036错误:非法的变量名/编号,找了一天,也不有解决好,请各位帮书记看一下,是哪里也了问题

原码如下:

#-*- coding: utf-8 -*-
import sys
import cx_Oracle
import random

reload(sys)
sys.setdefaultencoding("utf-8")

con =cx_Oracle.connect("88888","c888*<35L8","CEDB")
if con:
    print("连接数据库成功")
else:
    print("连接数据库失败")

def insertBsTcTransport():
    cusror =con.cursor()
#    cusror.execute ("select BS_APPLY_ID from tc_bs_transport order by BS_APPLY_ID desc")
#    cur =cusror.fetchone()
#    print cur[0]
    BS_APPLY_ID =2135094707
    TRANSPORT_ID ='SC_BS_TRANSPORT.nextval'
    param={'TRANSPORT_ID':TRANSPORT_ID,'process_node':'2-1','bs_apply_id':BS_APPLY_ID,'sell_user_id':1,'submit_dept_no':476,'apply_submit_time':'2014-04-28 14:23:17','apply_max_amount':1000.4611,'is_interest':'0','is_express':'0','product_type':'1','apply_min_amount':1000.7919,
           'long_repayment_term':18,'accept_moth_repay':1000.6505,'loan_purpose_one':'1','loan_purpose_desc':'性能数据使用','loan_purpose_two':'2','loan_count':2,'create_date':'2014-04-28 14:23:17',
           'creator':999999999,'oper_date':'2014-04-28 14:23:17','operator':999999999,'task_owner':777777777,'memo':'就是借款','loan_type':'0','is_chuding':'0','verify_page_vesion':'2','system_source_name':'XS','urgent_leve':0}
            
    cusror.execute('insert into tc_bs_transport values(:TRANSPORT_ID,:process_node,:bs_apply_id,:sell_user_id,:submit_dept_no,:apply_submit_time,:apply_max_amount,:is_interest,:is_express,:product_type,:apply_min_amount,:long_repayment_term,:accept_moth_repay,:loan_purpose_one,:loan_purpose_desc,:loan_purpose_two,:loan_count,:create_date,:creator,:oper_date,:task_owner,:memo,:loan_type,:is_chuding,:verify_page_vesion,:system_source_name,:urgent_leve)',param)
    con.commit()


请大家帮忙看一下,哪里出了问题?

加载中
返回顶部
顶部