Unanswered: Mistake for making a not void field empty provokes
I have a table with a field that is primary key and identity autoincrementable and has also another field that cannot be void,
On having inserted a new record (from the own(proper) Sql Server) and to make empty the field that cannot be void shows me a mistake, then I introduce the value in the above mentioned field and it turns out that the number of the field identity has increased one more number, therefore, a number has skipped.
How can I solve this problem?
It can only very badly that the client who uses the computer application sees hollows between the numbers.
My problem is that if I insert a record of a table that contains a field that cannot be void and for mistake I go on to the following record gives me a mistake that warns me that such a field cannot be void, but later on having inserted the value to the above mentioned field it has put a value in the field GO that it does not correspond.
Identifying - description - date
1 football 01/01/2008
empty basketball forgot me to put the date
ON HAVING GONE ON TO THE FOLLOWING RECORD IT GIVES ME A MISTAKE, THEN I GO OUT TO THE COUNTRY AND INTRODUCE THE DATE
3 basketball 12/12/2008
It is to say, me the value has put 3 instead of the value 2.
Has this solution??
I am working with sql server 2005 express
This happens to me when I insert a record from the Management Studio, when I select the table and say To open.
Agreed. There are numerous discussions in this area and the summary is
a) Why? Rarely necessary
b) If you do ever actually acheive this, your entire application will grind to a halt while every single transaction in your database waits until every other one has completed before it can assign a new ID. Your users will hate you for sure.