Find what has been added

Steve2106

New member
Local time
Today, 00:10
Joined
Oct 7, 2013
Messages
8
Hi There,

I'd appreciate your help.

I need to find out what has been added to a table and then add that for each record I have in a stringed list called "lstTasks". This is the scenario.

I have a table of file links with multiple entries for TaskId.
As I enter a procedure I need to get a list of all file links for TaskId = 1
Then after the procedure does it's stuff I need to check all file links for TaskId = 1 again and if there are more records added, I need to add those records for each id in the stringed list "lstTasks"

Don't know if that makes sense, I'm rubbish at explaining what I need.
The tables are in MS Sql Server.

Thanks for any help you can give.

Best Regards,
 
Show examples of the table/tables before and after -else it is hard to figure out what you want.

When displaying table data use code tags (go advanced->select data -> click #) or else the blanks will disappear.
 
Hi There,

I have uploaded a screenshot of the filedata.
http://www.dotnet4site.com/miscimages/4AccessHelp.jpg

If you think of the snapshot as when enter the procedure and WOID = 47172, I need to save the 3 records details and after the procedure does it's stuff I need to check if any files have been added to the table with WOID = 47172.
So where I had 3 records at the start and I have 4 records at the end I need to know which records are the new ones and then for each record I have saved in lstTasks (which holds a list of WOID's) add the new record to each of them.

Thanks for your help.

Best Regards,
 
You are talking about a form of AUDITING, which is the art/practice of change tracking.

In essence, the old programmer's rules apply here.

1. Access won't tell you anything you didn't tell it first yourself (or at least tell it HOW to tell you).

2. You aren't ready to do it in Access until you do it on paper.

Let's also compare the way that computers doing incremental backups know to do a backup of a file.

The solution is that if you want to always know that X has been added, you need flags that are part of the record that tell you "I have not been processed for auditing yet." There is an "ARCHIVE" bit in the Windows file systems for this purpose, which is why I made the earlier reference. Now, the question becomes... what if I change an existing record? You can either just reset the flag that says "I've changed" or you can have two flags - "I'm new" and "I'm not new but someone changed me." Then you sweep through your tables to find the flags and do your processing.

The alternative is that you do double-entry bookkeeping, which takes up twice the space in most cases.

Where this is going is that if you want to know if something changed, you have to make a way for Access to TELL you that something changed because otherwise you spend a ton of time poring through archival records looking for (literally) something that isn't there.
 
Great Explanation, I'm learning a lot =)
Many thanks ;)
 

Users who are viewing this thread

Back
Top Bottom