Re: [cx-oracle-users] expecting None or a string
Brought to you by:
atuining
From: Andreas M. <and...@we...> - 2011-10-24 19:00:58
|
Hi Anurag, searching for your error message with google brought this as one of the top results. Probably it helps: http://www.velocityreviews.com/forums/t691384-problem-about-cx_oracle.html Best regards Andreas Mock From: Anurag Chourasia [mailto:anu...@gm...] Sent: Monday, October 24, 2011 8:39 PM To: cx-...@li...; lar...@gm... Subject: Re: [cx-oracle-users] expecting None or a string The print returns this SELECT count(*) FROM T WHERE NBR = '1' and ID='1' Both NBR and ID are varchar in my case. This query works fine when executed directly using Oracle PL/SQL Plus Regards, Anurag On Tue, Oct 25, 2011 at 12:05 AM, Larry Martell <lar...@gm...> wrote: On Mon, Oct 24, 2011 at 12:31 PM, Anurag Chourasia <anu...@gm...> wrote: > Hi All, > I am getting an error "expecting None or a string" when executing a simple > SQL Query as this. > query = "SELECT count(*) FROM T WHERE NBR = '%s' and ID='%s'" %(nbr,id) > print query > cursor.execute(query) > This was working fine before and I have neither changed the code nor update > cx_Oracle or Oracle version etc. Well, what do you get when you print out the query? nrb or id probably don't have the value you think. ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ cx-oracle-users mailing list cx-...@li... https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |