ON UPDATE in Sybase

Is there an equivalent of the mysql timestamp - on update CURRENT_TIMESTAMP in sybase?

I have changed my mysql database to use a date modified field of this nature.

I have created the equivalent in sybase, but dont think it has the on update feature?

I am running a solution on both a mysql platform on my server for smart client and sybase for an offline model and want to do some better syncronisation.

If this is not available, would it be better to use the servoy Events on update on both solutions to trigger updating the timestamps rather than the mysql database side function on one and a servoy trigger on the other? ( i use the same source code, so i assume that it would not be good to run an on update mysql side and then when i import my solution with an on update event from my offline one, i would probably create an endless loop?)

David

What is wrong with the auto-enter properties in Servoy ? ;)

That wont work for an update of the record will it?

I have not used these a lot before.

I have the timestamp created by the database on record creation.

I think i need to use the on update event to update the timestamp.

Just working out how to do this from a global method? not as easy as i thought?

Hi David,

There is not only an auto-enter creationdate (server or client) but also a mutation date (server or client) in the auto-enter properties.
That should work fine unless you want to do some fancy stuff like setting the date in a parent record when some child records are being updated or something.

Edit: fixed a typo

Your a star, as always.

That works a treat! Now trying to work out how to do fail safe synchronization using it and making sure data isn’t overwritten wrongly.

Thats always the hard bit.

Many thanks

David