On Sep 15, 2009, at 6:01 PM, Paul McNett wrote:

>> AttributeError: pymssqlCnx instance has no attribute '_cnx'
>
> Okay, this is likely the root cause of the problems. Ed, why would  
> src._cnx not be
> defined?

        Because the code was never fully tested?  ;-)

        Here's the method in question; note the docstring:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        def getDictCursorClass(self):
                """Currently this is not working completely"""
                import pymssql
                class conCursor(pymssql.pymssqlCursor):
                        def __init__(self, src):
                                self.super(src._cnx)

                        def _getconn(self):
                                return self.__source
                        # pymssql doesn't supply this optional dbapi attribute, 
so create  
it here.
                        connection = property(_getconn, None, None)
                return conCursor
                #return cursors.Connection.cursor
                #return self._connection.cursor()
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        I suggest removing the entire __init__() method - it doesn't seem  
like it's needed.


-- Ed Leafe





_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/0574f1f1-c861-4021-b53b-0f9c88bcd...@leafe.com

Reply via email to