If you are sure that your SQL is correct, can you trap the error and repeat if necessary?