[orm-devel] SelectByPrimaryKey problem

Werner F. Bruhin orm-devel@mailman.tux4web.de
Sun, 02 Mar 2003 19:27:58 +0100

Hi Diedrich,

Unlike me I checked the documentation for kinterbasdb before anything 
else, and it clearly states that rowcount is NOT supported due to 
Interbase and Firebird limition (see below).  Checked the Firebird 1.5 
beta change notes and it does not look like anything changed to this affect.

*Unsupported Features*

    * |Cursor| class
          o |nextset| method

            This method is not implemented because the database engine
            does not support opening multiple result sets simultaneously
            with a single cursor.

          o |rowcount| attribute

            The value of this attribute is initially |-1|, and it never
            changes, because the Interbase/Firebird C API does not
            support the determination of the number of rows affected by
            an executed statement.

See you

Diedrich Vorberg wrote:

>Hi Werner,
>>If I comment 334 to 336 the code works, but obviously no check is done.
>>My question:  what are you trying to check at that moment?  Is there 
>>something returned by the other DB's at that point, if yes what?
>the problem might be the queryResult.__len__() method called by the
>len() function in selectByPrimaryKey(). It returns the cursor's
>rowcount attribute. Could you verify, that this attribute is set
>correctly be the DB API?
>If it isn't I'd have to rephrase the selectByPrimaryKey() method to
>skip the len() test and check the returnvalue of fetchone() instead.