Can use "executesql" in this case:
My code:
rows = db.executesql('SELECT * FROM abc;',as_dict=True)
for row in rows:
print row['name']
([name] is unicode field)
Error traceback
Traceback (most recent call last):
File "gluon/restricted.py", line 173, in restricted
File "E:/Web2py/web2py_win/applications/init/controllers/
default.py", line 211, in <module>
File "gluon/globals.py", line 96, in <lambda>
File "E:/Web2py/web2py_win/applications/init/controllers/
default.py", line 209, in dshuyen
File "encodings\cp437.pyc", line 12, in encode
UnicodeEncodeError: 'charmap' codec can't encode character u'\u1ed1'
in position 8: character maps to <undefined>
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en.