Ed Leafe wrote:
On Monday 15 August 2005 13:28, Paul McNett wrote:
If the above is true, and if it is also true that Dabo only uses the
field names anyway, then it seems that a simple defensive block like
this would suffice:
cursorDescription = cursor.description
if not isinstance(cursorDescription, list, tuple):
cursorDescription = []
# and from then on, refer to cursorDescription instead of directly
# to cursor.description
The problem, of course, is that the cursor.description is used in multiple
places. Now we have to write such a block everywhere, and remember to do so
if we ever use it anywhere else.
I'm leaning toward defining a property with only a getter method that
essentially does what you outline above.
Sounds like the right approach. Get the value once from the underlying
cursor (right after the requery I guess), put it into a dabo sanitized
format, and from then on use the dabo value.
--
Paul McNett
http://paulmcnett.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users