S
StatBoy
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.
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.