I am running into a problem where my check constraints are correctly stopping commands from executing but my Identity column value increases. I guess this is because the check occurs after the statement runs and the transaction gets rolled back due to the check failing. This leaves the identity value incremented by 1.

Is there a way to run the constraint check before the SQL statement gets executed?

```
CREATE TABLE TestTable
(
    Id INT IDENTITY(1,1) PRIMARY KEY(Id),
    Name VARCHAR(100)
)

INSERT INTO TestTable VALUES ('Type-1'),('Type-2'),('Type-55'),('Type-009')

--Add a check constraint so nobody can edit this without doing serious work
ALTER TABLE TestTable WITH NOCHECK ADD CONSTRAINT [CHECK_TestTable_READONLY] CHECK(1=0)

--This fails with the constraint as expected
INSERT INTO TestTable VALUES('This will Fail')
INSERT INTO TestTable VALUES('This will again....')

--Check the Id, it was incremented...
SELECT (IDENT_CURRENT( 'TestTable' )  ) As CurrentIdentity

```