On Sunday 17 February 2008 11:29 am, johnf wrote: > On Sunday 17 February 2008 11:09:42 am Ed Leafe wrote: > > On Feb 17, 2008, at 12:57 PM, Adrian Klaver wrote: > > > It displays '<None>' when there is a NULL in the field. My problem > > > comes when I > > > create a new record. If I don't enter a value in a field the value > > > passed to the INSERT > > > statement is '' for a string column, 0 for a number column and False > > > for a boolean. > > > This causes problems with the DEFAULT values I have set up in the > > > Postgres database. > > > Instead of the column receiving a NULL value and filling in the > > > correct default it receives > > > an invalid value. I am trying to figure out a way to undo this > > > editorializing without having > > > to specify DEFAULTS for the fields in DABO as they already exist in > > > the database. > > > > The only way to do that currently is to specify None as the default > > value in the bizobj for those fields. Then when the record is inserted > > into thedatabase, most backends will interpret a null as a request for > > the default value. > > > > What if I were to add code that said that if biz.DefaultValues = None > > (instead of an empty dict), all the non-PK values would be assigned > > values of None? I haven't tested it or anything; just throwing out > > ideas. > > > > -- Ed Leafe > > That sounds great for the postgres guys but if memory serves it doesn't > work the same way for FireBird. At least that's what I got from Uwe's post > from several months ago.
>From Eds description this would be a property of the bizobj so it would be a matter of choice and settable depending on the database. -- Adrian Klaver [EMAIL PROTECTED] _______________________________________________ Post Messages to: [email protected] 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/dabo-users/[EMAIL PROTECTED]
