in reply to Re: Re: How do I avoid inserting duplicate numbers into an Access table?
in thread How do I avoid inserting duplicate numbers into an Access table?

Here is the line that is exiting your script:

die qq(SQL fail "$rc":), $db->Error(),qq(n) if $rc;

Just handle the error differently. Check $rc or $db->Error(), and continue with the next insert if the error points to a duplicate value.

# untested if ($rc == WHATEVER_ERROR_IS_GENERATED_BY_DUPLICATE) { # you can also test ($db->Error() =~ /some value/) next; } else { die qq(SQL fail "$rc":), $db->Error(),qq(n); }
Your script will still die if the insert fails for a different reason.

HTH...