Am Fri, 19 Aug 2005 23:38:22 +0200 schrieb Ed Leafe <[EMAIL PROTECTED]>:

On Aug 19, 2005, at 5:39 AM, Adi J. Sieker wrote:

The getFields thing came up because the sqlite cursor doesn't fill
cursor.description, so that when you call dForm.new(),
cursormixin.setDefaults raises a ValueError "Can't set default value for
nonexistent field '%s'."
So I thought about using getFields to return the Field information for
SQLite.

The 'setDefaults()' call doesn't use data types; instead, it is simply a dictionary with field names and default values that allows the developer to set default values for some fields in new records. There is a bizobj attribute 'defaultValues' that is the dictionary passed to setDefaults() (see line 94 of the SimpleFormWithBizobj.py demo script for a sample usage).

I'm looking into the getFields() situation, but I gotta go take my kid somewhere now. I'll look at it in more depth tonight.

I gathered that setDefaults doesn't need datatype but it uses the Fieldnames from Fielddescription
which is an empty dictionary in the SQLite case.

Basically what I need to get SQLite working, is a way to get a list a field names for a give table,
since empty SQL statements return an empty description.

adi

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to