comments or ideas : WhoChanged in BO and the database

comments or ideas : WhoChanged in BO and the database

Old forum URL: forums.lhotka.net/forums/t/1462.aspx


figuerres posted on Thursday, October 12, 2006

I am trying to make a call on how I want to make this work, input and ideas are welcome:

each table has a set of items that are always persent:

ID,Active,CreationTimestamp,WhoCreated,LastChnaged,WhoChanged

CreationTimestamp is datetime, WhoCreated is an int that is set one time

LastChnaged is datetime of the last update, WhoChnaged is an int id of the user who made the chnages.

now I want to on a read/edit form to show the name of the person who created the record and the name of the person who made the last update.

so I am debating on:

read from db and edit the BO to make the strings RO and not send them out for updates

or

make a global list of ID,name and bind a control to show the name

or

make a namevalue list and have many instancaes as needed with the same list in memory a bunch of times.

or ???? ideas ????

the global list has some points in that it might keep from a lot of db access and the list will not chnage very often.

but then do I bind it on the form or use a ro property in th BO or???

just wondered if others have the same kind of thing and how they deal with it.

 

JHurrell replied on Thursday, October 12, 2006

You could just join that table on your users table to retrieve the name. Display the name instead of the ID in your BO that displays that audit information.

The catch is that you can't delete users. You'd have to disable them or the JOIN won't work.

Keep in mind that what you're proposing will only show the last change and not a HISTORY of changes.

- John

figuerres replied on Thursday, October 12, 2006

JHurrell:
You could just join that table on your users table to retrieve the name. Display the name instead of the ID in your BO that displays that audit information.

The catch is that you can't delete users. You'd have to disable them or the JOIN won't work.

Keep in mind that what you're proposing will only show the last change and not a HISTORY of changes.

- John

 

I know the "Last Changed" is not a history... I keep that in an aduit table when needed.

I guess I could go with a join on select, then I'd need to tweak my Upddate and Insert procs to ignore the names and use the ID ...

Copyright (c) Marimer LLC