RE: Saving Action Query Warnings
- From: Klatuu <Klatuu@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 20 May 2008 14:49:17 -0700
If you need to do this, you will be reduced to a one at a time situation.
Bulk imports and exports are just one command and there is no facility to
exclude records that can't be imported.
There is one other option, but whether it would work for you would depend on
the nature of the data you are importing. What format is the data coming in
in? Excel, text file, external database, etc?
--
Dave Hargis, Microsoft Access MVP
"StatBoy" wrote:
I'm working on automation for a bulk data import function that will be used.
repeatedly. I'd like to find a way to SAVE the warnings that Access often
displays during execution of an "append" query. These would be useful
history for the user to review and it would be very convenient to simply
stash them in rows of a table characterizing the overall data import
operation.
Say for instance I'm trying to append 2000 records. And Access in response
displays a message indicating 12 key violations, and 20 validation rule
violations. I'd like to be able to store that message for more detailed
examination by the user at a later time.
Can't seem to find a direct, straightforward way to do this. I've
investigated VBA approaches using "Connection.Execute strSQL..." and
"CurrentDB.Execute strSQL...", with subsequent VBA examination of the
"Errors" collection. However, at present it seems that these approaches just
stop the import operation ENTIRELY as soon as any SINGLE error arises. That
doesn't really match my needs here. If 1950 out of 2000 records CAN be
loaded, I want that to be done... so long as I have a record of what I need
to check about the records that did NOT load.
I'm hoping there is a way to do this short of constructing a VBA function
that submits individual SQL "insert" commands for each individual incoming
record...
It also seems to me that SOMEONE out there must have done something like
this already...
Can anyone offer sage experience and suggestions?
Thanks much.
- References:
- Saving Action Query Warnings
- From: StatBoy
- Saving Action Query Warnings
- Prev by Date: Saving Action Query Warnings
- Next by Date: Importing everything from Excel file as text
- Previous by thread: Saving Action Query Warnings
- Next by thread: Re: Saving Action Query Warnings
- Index(es):
Relevant Pages
|