Ed Leafe wrote:
> On Feb 17, 2008, at 1:33 PM, Adrian Klaver wrote:
> 
>>>     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.
>>>
>> I would greatly appreciate it. I know wars have been fought over  
>> NULL, but it
>> does serve a purpose.
> 
> 
>       OK, I've done some tests, and it doesn't look good. It seems that if  
> I set those values to None, when the record is saved it creates SQL  
> like:
> 
> insert into mytable (foo, bar, baz) values (None, None, None)
> 
> ...and if those fields do not accept null values, it will return an  
> error. The only way to get the database defaults is to not include  
> those fields in the insert statement, but that will take a much more  
> extensive re-working of the code.

Dabo shouldn't touch fields which doesn't get entered by the user or 
don't get values by code. Dabos behavior of assigning a value (eg.: 
TextBoxes get set to '') is wrong here!
But Dabo should also support setting database fields to NULL again.
This seems to be a problem of Dabo, as Dabos doesn't seem to be aware of 
which fields got changed somhow. An empty textcontrol isn't the same as 
NULL!

Uwe



_______________________________________________
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]

Reply via email to