Re: [cx-oracle-users] INSERT INTO -- cx_Oracle
Brought to you by:
atuining
From: broletto <te...@br...> - 2012-04-29 08:02:27
|
On 29/04/2012 06:12, Anthony Tuininga wrote: > Hi, > > You'll have to tell us what the actual values are that you are > passing. Looks like one of them is a list or tuple which cx_Oracle > automatically binds to an array. > > Anthony > > On Sat, Apr 28, 2012 at 3:43 PM, broletto<te...@br...> wrote: >> Hello list, >> >> please i found someone can help me to resolve a problem between python >> and cx_Oracle >> i must insert some data inside my Oracle Express, i use python to do this. >> >> try: >> self.c.execute('''INSERT INTO MODELLO (title, >> descrizione, url, prezzo, sconto) >> VALUES(:1, :2, :3, :4, :5 )''', >> >> (item['title'], >> >> item['descrizione'], >> >> item['url'], >> >> item['prezzo'], >> >> item['sconto'] >> )) >> >> self.db.commit() >> >> except cx_Oracle.DatabaseError, exception: >> error, = exception >> print "Oracle error: ", error.message >> >> ** item are list of data >> when run this code i received an output error: >> Oracle error: ORA-01484: arrays can only be bound to PL/SQL statements >> >> thanks >> marco >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > hello, thanks anthony if you want here http://pastebin.com/Yknan8dk you seen a simple example of items details i try to pass at oracle. thanks marco |