Sibylle Koczian wrote:
> "Uwe Grauer" <[EMAIL PROTECTED]> schrieb:
>> I don't think that you can use onSaveNew() for this because it's called
>> after the actual save to the db:
>> """
>> onSaveNew(self)
>>
>> Hook method called after successfully saving a new record.
>> ""
>>
>> Try to put it into the beforeSave() hook of your bizobj.
>>
>> I often do this kind of work in the onHit of the forms save button.
>> Of cause it depends on where and how Form.save() gets called.
>>
> 
> Will try. I had overlooked the "IsAdding" property, that's why I didn't
> consider beforeSave().
> 

Ed wrote that validateRecord of the bizobj would be a good place too.

>> Did you think about using database triggers for this?
>> Sounds like a perfect case for an after insert trigger.
>>
> 
> Normally, of course. But on the one hand I just wanted to try out the
> other way. On the other hand the SQLite trigger syntax is quite
> restricted, moreover I'd prefer to calculate using Decimal and just put
> the final result into the database. 
> 
> Sibylle
> 

I was under the impression you are using Firebird.

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/[EMAIL PROTECTED]

Reply via email to