SQL insert incrementing the key

I hit a weird... thing in ColdFusion this weekend. I have a table with an identity/autonumber. When an insert fails, it's still incrementing the autonumber. So I insert a good one, #1, then three bad ones, and another good one and it's #5. It's just an autonumber so I shouldn't care, but I want to understand this. Does it increment because it starts the insert, then fails? Might help to say it's failing because of a foreign key restraint.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
BlogCFC was created by Raymond Camden. This blog is running version 5.9.002. Contact Blog Owner