By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,974 Members | 1,834 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,974 IT Pros & Developers. It's quick & easy.

Re: how to mysqldb dict cursors

P: n/a
Vaibhav.bhawsar wrote:
I have been trying to get the DictCursor working with mysqldb module but
can't seem to. I have pasted the basic connection code and the traceback
from pydev. The connection does open with the default cursor class.
can't figure this one out. many thanks.
Try one of:

import MySQLdb, MySQLdb.cursors
conn = MySQLdb.connect(..., cursorclass=MySQLdb.cursors.DictCursor)


import MySQLdb, MySQLdb.cursors
conn = MySQLdb.connect(...)
cur = MySQLdb.cursors.DictCursor(conn)

I'm going off of memory here, though, but I'm at least close.


Jun 27 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.