79748844

Date: 2025-08-28 08:55:27
Score: 0.5
Natty:
Report link

Think the question is NOT about reading an error message, and NOT about how to enable identity_insert (you can see this from the 1st code snippet of the question itself). It is also NOT about if using identity_insert is a good, bad or risky thing.
The question was: "However when I run the application..."
Or: Why does it work once, but does not work a second time.
Answer: you have to enable identity_insert per connection.
Good practice: enable it only temporarily for a single insert statement.
use it only if you really need it.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Toni Schilling