Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to retrieve the new primary key?
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00809477
Message ID:
00809484
Vues:
35
I found the answer to my question but I may have found a bug in the framework. The RetrieveAutoIncrementPK flag seems to be the answer to my question. However, when I set this flag to true, I am getting a NULL error.
Cannot insert the value NULL into column 'irecversion', 
table 'aav3.dbo.AAName'; column does not allow nulls. INSERT fails.
The field irecversion already have a default value of 0 set in the SQL Server. I should never get this particular error useless the INSERT command is actually sending NULL as the value of irecversion. BTW, when I set
RetrieveAutoIncrementPK back to false, the insert works correctly.
Stephen Lee

--------------------------------
Too much to code
Too little time
--------------------------------
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform