Logging Append Errors

robert_neville

New member
Local time
Today, 06:49
Joined
Apr 29, 2003
Messages
9
Access’s append and update queries aid me when importing data into my database. Even though the approach works, errors creep in when the data become inconsistent. Unfortunately, the import data has a free-form nature. Code and queries allow me to deal with this free-form nature, yet I hope to refine the approach in manageable steps.

My main question involves logging append queries errors; such as type conversion failure, key violations, lock violation, validation rule violations. A log would help me understand what data fails the append/update process. These failures often occur by design to avoid appending duplicate data. Other times the failures equate to inadequate validation routines. I would like to manually verify these failures through a log table and reassure myself that the errors occurred due to duplicates rather than inadequate code.

I understand that better validation routines will be necessary; yet my question relates to the measuring tools for developing better validation routines. Logging append errors are these measuring tools. Eventually, this approach will lead to utilizing VBscript and then Perl. VBscript seems more approachable than Perl that has a complete distinct syntax. I have begun reading about regular expressions, and find them somewhat straight forward. Incorporating regular expressions into VBA, Access, or a Perl wrapper remains vague. The unknowns relate to passing data through modules with regular expressions; or step through certain fields in a recordset. Please let me know your thought about logging append errors.
 
Actually it all depends on how you wish to do it. I usually use a bunch of validation queries on an import table to either fix the data, or just identify it. I find I can put a binary field (yes/no) on each record, run a bunch of validation queries, set that field when an error occurs. I can then run a query on those set flags and manually address/view the data. Then I know what needs to be addressed. I perfer to use validation queries because you can pick and choose, add or delete as the need arises with little extra effort or adding bugs to code. you can even run fix queries, then run the validation queries to see what you have missed.
Just my thoughts.
 

Users who are viewing this thread

Back
Top Bottom