Personal tools
You are here: Home Forums DB2 question about pydb2
Navigation
Log in


Forgot your password?
 
Document Actions

question about pydb2

Up to DB2

question about pydb2

Posted by Hu Lu at December 22. 2009



I followed your example in "How to acess DB2 using Python", but got an error with "rows = curs.fetchall()" as below:


Traceback (most recent call last):


File "<interactive input>", line 1, in <module>


AttributeError: fetchall




Could you tell me what may caused the problem? It seems I can use fetch() but not fecthall().




I am using PyDB2-1.1.1-py2.5 on Windows XP.


Re: question about pydb2

Posted by perallis at December 23. 2009

Try to use fetchone() and tell us the result.






Regards,
Vinicius Perallis
DBA DB2


Re: question about pydb2

Posted by Hu Lu at December 23. 2009

Sorry it was my mistake. I was using _db2.connect() instead of DB2.connect().


Thanks for your How-to posts on PyDB2 and db2util. They were the most helpful ones I could find on the web.




Powered by Ploneboard
Security Awareness
Would you like your company to implement gamification into your security awareness program?





Polls