Connecting Tech Pros Worldwide Forums | Help | Site Map

Form data change capture

Site Addict
 
Join Date: Feb 2007
Posts: 553
#1: Aug 24 '07
Hi

I know i have posted similar question before but there is something i need to ask further to that.

If you have many text-boxes on the form and you want to check if any changes to the data in the textfields is made , how would you capture the changed data (the new data) . And if you want to capture the old data as well (the one that got changed later)

Capturing will be just storing it in another variable or assigning to a field in table.

Any ideas ?

Thanks
Qi

missinglinq's Avatar
Moderator
 
Join Date: Nov 2006
Location: Richmond, Virginia USA
Posts: 3,001
#2: Aug 24 '07

re: Form data change capture


What you’re talking about is creating an audit log table, which is not an easy endeavor. I would suggest searching here and googling this term. But from other posts here you’ve been told how to tell Has data been changed and How to loop thru controls.

So, if any data in a record has been changed, loop thru the controls and compare the old value (MyControlName.OldValue) with the current value (MyControlName.Value) and if they’re different, assign them in whatever fashion you want to an audit table.

Linq ;0)>
Site Addict
 
Join Date: Feb 2007
Posts: 553
#3: Aug 24 '07

re: Form data change capture


Thanks missinglinq..
Quote:

Originally Posted by missinglinq

What you’re talking about is creating an audit log table, which is not an easy endeavor. I would suggest searching here and googling this term. But from other posts here you’ve been told how to tell Has data been changed and How to loop thru controls.

So, if any data in a record has been changed, loop thru the controls and compare the old value (MyControlName.OldValue) with the current value (MyControlName.Value) and if they’re different, assign them in whatever fashion you want to an audit table.

Linq ;0)>

missinglinq's Avatar
Moderator
 
Join Date: Nov 2006
Location: Richmond, Virginia USA
Posts: 3,001
#4: Aug 24 '07

re: Form data change capture


As I said earlier, tracking these kinds of changes is not for the faint of heart, but Allen Browne gives an excellent explanation of how to Create an Audit Log at this site.

Linq ;0)>
Reply