Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add Date/Time stamp to tables in dbc.
Message
 
To
08/03/1999 20:43:10
Susan Giddings
Aar Engine Component Services
Windsor, Connecticut, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00195409
Message ID:
00195416
Views:
17
I needed to do this in VFP3. At the time, I didn't trust the DBC rules, triggers etc. (combination of my being new to VFP and VFP databases being new and untried). We made a new TableUpdate() function called TableDTUpdate() and simply used it instead of TableUpdate(). All it did was replace the "lastupdt" field with the system date/time if the field existed.

Worked like a charm, since noone except one supervisor had access to the raw data.

Barbara

>Is there an easy or preferred way to maintain a date/time stamp field in a table (in a dbc)? I want to record the last date/time that a record is modified (which includes a delete). All my tables already have a date/time field and I do have a default value coming in when a record is added, but I need it updated whenever the record changes & I'm not sure where the best place to put this is. I'm thinking that it's better to be in the dbc as a record validation rule, but I'm already using those on many tables. I hate to write a ton of procedures to call two validation rules, but I will if I have to. The only alternative I can think of is to add the code to the class for the save push button, but for some reason I'm thinking that's not the cleanest and safest way to manage it. Any suggestions or tips?
>TIA, Susan
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform