You Are Here:

Community: Developer Discussion Boards

#1 Old issue with cx_Oracle while trying to insert into database - 2008-05-19, 07:42

Join Date: May 2008
Posts: 1
destiny1
Offline
Registered User
Hi ,
I am getting the following error while trying to make an insert into the database using the DB-API cx_Oracle in python 2.5.
Earlier when I used DCOracle2 as DB-API the insert statement I used was working fine. But when I shifted to the other DB_API due to some compatibility issues, I get the following error:

Error:

>>> dbconnect.dbinsert("filelist.txt")
connection to db
89 97
298 298

Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
dbconnect.dbinsert("filelist.txt")
File "C:\Documents and Settings\harshu\Desktop\project\final_python\dbconnect.py", line 85, in dbinsert
Result_list[ResultListIndex +2])
TypeError: function takes at most 2 arguments (7 given)


Following is the syntax I am using:

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])


Please suggest the correct syntax.

Regards,
Harshu
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Database File Size Issue gowthamyemme General Symbian C++ 7 2008-09-02 10:31
Database issue anoopd General Symbian C++ 6 2007-07-27 07:59
application crash and database related issue mayankkedia General Symbian C++ 2 2004-08-24 06:00
Database Sharing Issue rave_symbian General Symbian C++ 0 2003-10-20 12:12
Database Sharing Issue. rave_symbian Symbian Tools & SDKs 0 2003-10-17 11:35

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia