Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 5 of 5 total |
How to get TimeStamp to automatically timestamp a record when it changes? |
Sat, Aug 4 2007 1:20 PM | Permanent Link |
Dave Harrison | I thought the TimeStamp field type would automatically put the date/time
of when the record was created/modified like it does in MySQL, but it doesn't. How can I automatically timestamp a record whenever it changes without resorting to code? I have several tables that are created dynamically from this structure and I don't want to have to remember to assign before post events to each table instance. (I suppose I'll have to unless there is a simpler way). Dave DBISAM 4.25 |
Sat, Aug 4 2007 1:57 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Dave
With DBISAM the only way of doing this is code. The best I can suggest is add a BeforeUpdateTrigger, check for a specific tablename, fieldname (or type) and stuff the timestamp in. Roy Lambert |
Sat, Aug 4 2007 5:52 PM | Permanent Link |
"Robert" | "Roy Lambert" <roy.lambert@skynet.co.uk> wrote in message news:01AB98F6-E17B-4882-8837-213ABBE41CE2@news.elevatesoft.com... .. The best I can suggest is add a BeforeUpdateTrigger, BeforePost. That way you also catch new rows. Robert |
Sat, Aug 4 2007 6:01 PM | Permanent Link |
Dave Harrison | Robert wrote:
> "Roy Lambert" <roy.lambert@skynet.co.uk> wrote in message > news:01AB98F6-E17B-4882-8837-213ABBE41CE2@news.elevatesoft.com... > . The best I can suggest is add a BeforeUpdateTrigger, > > BeforePost. That way you also catch new rows. > > Robert > > Robert, That would work if there were only 1 table. But I'm also creating tables dynamically with the same record structure so I could easily forget to add that event to each table. A trigger is centralized in the engine so it catches all the table updates . Dave |
Fri, Aug 10 2007 6:10 AM | Permanent Link |
Chris Erdal | Dave Harrison <daveh_18824@spammore.com> wrote in news:CC5E3C8E-A91E-48B7-
8B98-5A5AB37385BD@news.elevatesoft.com: > A trigger is centralized in the > engine so it catches all the table updates . perhaps a bit late if your database is already out there, but you could give the same name to all Timestamp fields in every table that need this functionality, and incorporate the update for this particular field (if there is one) on every trigger call. -- Chris (XP-Pro + Delphi 7 Architect + DBISAM 4.25 build 4 + EDB 1.04 build 3) |
This web page was last updated on Thursday, April 18, 2024 at 10:42 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |