Got the following -

{72991792: (u'Transactions', 'TransID', [], {})}

--------------------------------------------------
From: "Ed Leafe" <e...@leafe.com>
Sent: Tuesday, June 09, 2009 9:57 AM
To: "Dabo Users list" <dabo-users@leafe.com>
Subject: Re: [dabo-users] Problem with SQLite

> On Jun 8, 2009, at 7:41 PM, Roger Lovelock wrote:
>
>> In my forms afterInit I was doing a self.refresh() and then a
>> self.new() - this was causing the first record in the table to be
>> loaded and for some reason the date field to be overwritten with the
>> default. Then when I did a self.new() this record was being saved
>> back - thus causing my problem - the new record was then processed
>> corectly. I tried just removing the self.refresh() from my code -
>> this got rid of the initial problem of the first record being
>> updated but  I then got an error saying that a datetime field was
>> being received when a unicode field was expected for my Date field -
>> ie the self.refresh() was needed in order for the datatype of the
>> field to be set correctly in my bizObj. The final solution was to
>> put the self.refresh() back in, but then to put a self.cancel()
>> before the self.add() - everything works fine now!
>
>
> This seems very odd - self.refresh() only repaints the form; it
> doesn't interact with the bizobj or the values of the controls at all.
> self.new() shouldn't automatically save anything, as it doesn't
> destroy the cursor contents as a requery() would.
>
> If the self.cancel() call was needed, that means that something else
> is changing the value in your bizobj's data. Can you try this: before
> your call to self.cancel(), add these lines:
>
> from pprint import pprint
> pprint(self.PrimaryBizobj.getDataDiff())
>
> Let me know what it prints out - that may be the clue as to what is
> modifying your data.
>
>
> -- Ed Leafe
>
>
>
> _______________________________________________
> Post Messages to: Dabo-users@leafe.com
> 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/4845d8e5-b39e-4cbc-bf6e-f05db39e8...@leafe.com
> 
_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/col102-ds147b85186f22917146fa3b9...@phx.gbl

Reply via email to