Hi,
I am using cx_oracle DB-APi to insert large number of records into database.
I am using the following code
# code to write all the queries in the DB
================================
while ResultListIndex < len(query_list) :
cursor.execute("insert into tbl_query_detail(hash_value,file_name,package_name,QUERY_NUMBER,\
author_name,FULL_QUERY,BASE_QUERY_INDICATOR) values \
(A.NEXTVAL,:file_name,ackage_name,:QUERY_NUMBER,:author_name,:FULL_QUERY,:BASE_QUERY_INDICATOR )"\
,filename,Result_list[0],Result_list[ResultListIndex],\
'abc',Result_list[ResultListIndex + 1],\
Result_list[ResultListIndex +2])
ResultListIndex = ResultListIndex + 3
ResultListIndex=1
Result_list=[]
FileListindex=FileListindex+1
db.commit ()
cursor.close ()
getting the following error:
Result_list[ResultListIndex + 2])
TypeError: function takes at most 2 arguments (7 given)
Please suggest the format or corrections required
I am using cx_oracle DB-APi to insert large number of records into database.
I am using the following code
# code to write all the queries in the DB
================================
while ResultListIndex < len(query_list) :
cursor.execute("insert into tbl_query_detail(hash_value,file_name,package_name,QUERY_NUMBER,\
author_name,FULL_QUERY,BASE_QUERY_INDICATOR) values \
(A.NEXTVAL,:file_name,ackage_name,:QUERY_NUMBER,:author_name,:FULL_QUERY,:BASE_QUERY_INDICATOR )"\
,filename,Result_list[0],Result_list[ResultListIndex],\
'abc',Result_list[ResultListIndex + 1],\
Result_list[ResultListIndex +2])
ResultListIndex = ResultListIndex + 3
ResultListIndex=1
Result_list=[]
FileListindex=FileListindex+1
db.commit ()
cursor.close ()
getting the following error:
Result_list[ResultListIndex + 2])
TypeError: function takes at most 2 arguments (7 given)
Please suggest the format or corrections required