Error in inserting into database

Joined
May 23, 2008
Messages
10
Reaction score
0
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,:package_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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top