Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

keep tack of changes made to a record

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello all,
I'm using Access as the backend for an ASP project. It is a basic data entry, retrevial and data correction app. But one of the requirements is to keep track of all changes made to an record.

Another issue I have is, each Form need a unique ID which must be atleast five digits (Alpanumeric) longs. If I use the Autonumber the database starts with the one and goes from there. And the same is true if I use a counter on the web site, and I really don't feel comfortable using a counter as the Unique ID number. Any suggestions are welcome.
Thanks
 
in order to track changes, you need to restrict users from accessing the database itself, and using your asp pages exclusively. then, any time updates are made to your database using asp, just add a log to a simple text file, or to another table in the database, recording the old value, the new values etc.

about your unique id, keep the primary key as an autonumber, but add another text field to the table. make sure this field is indexed, no duplicates, to ensure that duplicates do not occur, and then generate a string using asp or vbscript.

i use a similar technique to generate a username:
Code:
strUser = "us" + CStr(Int((9 * Rnd) + 1)) + CStr(Int((9 * Rnd) + 1)) + CStr(Int((9 * Rnd) + 1))
which generates a username of usXXX with X being random digits from 0-9
 
For tracking changes to records, see faq181-291. It is only useful as a concept, as it was written for ver '97 BOUND forms. If you use ver 2K, you could use MSDE, which has RECORD events to do much the same.

Re the second question, I'm sure I don't understand what you mean by FORM Id. If you are refering to RECORD Id, see faq700-184 for (AGAIN!) some conceptual insight as to how to generate Unique Id's other than Autonumber or GUID. It is not appropiate to the use you have -at least as I understand it- but does something like what you want.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Thank you so very much. All the comments and recommendations are very helpful. I will get to it right away.

Thanks again.

Sincerely,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top