the current transaction cannot be committed and cannot support operations that write to the log file. roll back the transaction.
Welcome to the solution site, which is interested in answering educational questions, as it provides an answer to your questions in all areas
The solution site is concerned with questions, answers and solutions for all study materials for all levels
Through the word “Ask a Question“ at of the site, you can ask any topic or any question or inquiry you want answered by users specialized in solving questions and educational and academic activities that you ask
Now let’s answer your question
the current transaction cannot be committed and cannot support operations that write to the log file. roll back the transaction.
answer : You should put the Rollback of the transaction before attempting to insert anything into the log table – if you think about it, that error table update will be rolled back as well as the original insert. Try this instead (untested)