Użytkownik Paul McNett napisał:
> On 12/3/10 1:55 PM, Jacek Kałucki wrote:
>    
>> Użytkownik Paul McNett napisał:
>>      
>>> The cursor requery is precisely where the datastructure would change.
>>>        
>> Sorry, but I can't see such place.
>> Could you show me it please?
>>      
> If someone hasn't set biz.DataStructure explicitly, then it comes from the 
> cursor.
> The cursor defines DataStructure in the storeFieldTypes() segment, which 
> happens
> during the cursor.requery() process.
>
>    

I see it a bit differ:
1) the dCursorMixin.DataStructure never changes for aux cursors [1]
2) dCursorMixin._types depends from DataStructure but not vice versa.
3) if not set explicitly, dBizobj.DataStructure derives from 
dCursorMixin.DataStructure
4) if not set, dCursorMixin.DataStructure is retrieved directly from 
backend metadata.

Try to add some logging:
             if self.DataStructure != oldDataStructure:
                 ## The Record object must be reinstantiated to reflect 
the new structure:
                 dabo.log.info("Data structure of %s has changed!" % 
self.Name)
                 self._clearCursorRecord()

For me, it never changes, no matter if structure is defined or retrieved 
automatically.

[1] I think it's wrong. Eg. if my primary cursor sql is "select * from 
table a",
     for any other cursor retrieved with executeSafe and sql like
     "select * from table b", I still receive Record with structure from 
table "a"
     instead of "b".
     Maybe should I use getTempCursor() in place of executeSafe()?

-- 
Regards
Jacek Kałucki


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to