Página 1 de 1

TDataSet:OnPreChange()

Publicado: Lun Mar 02, 2009 4:37 am
por g.s.rogers
The documentation says "Event that is produced before the navigation pointer
changes position in the TDataSet."
I am wondering if this event is similar to OnPreAppend, however. In other
words, I am wondering if this event is fired every time the record pointer
changes in the dataset (like the documentation states), or instead, if this
event actually fires when a TDataSet:Edit() method is invoked.
I like to datestamp appends, edits, and deletes. I can datestamp a newly
added record very well with OnPreAppend, however I would like to do the same
with edits and deletes. I see that there is a OnPreAppend() event and
OnPreDelete() event, so datestamping appends and deletes shouldn't be a
problem, but I don't see a OnPreEdit. How can I do the same with edits?
TIA,
Gary

TDataSet:OnPreChange()

Publicado: Lun Mar 02, 2009 11:12 am
por ignacio
Gary,
> I am wondering if this event is similar to OnPreAppend
No, is not.
>however I would like to do the same with edits and deletes.
Use OnUpdate or OnPreSave for edit operations. Note that OnPreSave is also
normally also called on append operations.
Regards,
--
Ignacio Ortiz de Zúñiga
Xailer support / Soporte de Xailer
http://www.xailer.com
http://www.xailer.info
"Gary S. Rogers" <g.s.rogers@att.net> escribió en el mensaje
news:49ab5469$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> The documentation says "Event that is produced before the navigation
> pointer changes position in the TDataSet."
>
> I am wondering if this event is similar to OnPreAppend, however. In other
> words, I am wondering if this event is fired every time the record pointer
> changes in the dataset (like the documentation states), or instead, if
> this event actually fires when a TDataSet:Edit() method is invoked.
>
> I like to datestamp appends, edits, and deletes. I can datestamp a newly
> added record very well with OnPreAppend, however I would like to do the
> same with edits and deletes. I see that there is a OnPreAppend() event and
> OnPreDelete() event, so datestamping appends and deletes shouldn't be a
> problem, but I don't see a OnPreEdit. How can I do the same with edits?
>
> TIA,
> Gary
>
>
>
>
>

TDataSet:OnPreChange()

Publicado: Lun Mar 02, 2009 11:12 am
por ignacio
Gary,
> I am wondering if this event is similar to OnPreAppend
No, is not.
>however I would like to do the same with edits and deletes.
Use OnUpdate or OnPreSave for edit operations. Note that OnPreSave is also
normally also called on append operations.
Regards,
--
Ignacio Ortiz de Zúñiga
Xailer support / Soporte de Xailer
http://www.xailer.com
http://www.xailer.info
"Gary S. Rogers" <g.s.rogers@att.net> escribió en el mensaje
news:49ab5469$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> The documentation says "Event that is produced before the navigation
> pointer changes position in the TDataSet."
>
> I am wondering if this event is similar to OnPreAppend, however. In other
> words, I am wondering if this event is fired every time the record pointer
> changes in the dataset (like the documentation states), or instead, if
> this event actually fires when a TDataSet:Edit() method is invoked.
>
> I like to datestamp appends, edits, and deletes. I can datestamp a newly
> added record very well with OnPreAppend, however I would like to do the
> same with edits and deletes. I see that there is a OnPreAppend() event and
> OnPreDelete() event, so datestamping appends and deletes shouldn't be a
> problem, but I don't see a OnPreEdit. How can I do the same with edits?
>
> TIA,
> Gary
>
>
>
>
>