Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to retrieve the new primary key?
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00809477
Message ID:
00810555
Views:
19
I am not overriding any of the SQL command in the data layer, which mean MM.NET is using the commandbuilder. Do you mean I have to tell the data object which field is not allow null if I want to retrieve the primary key? Is this also mean the default value in SQL schema is not compatiable with MM.NET?

Stephen



>The default values are not used by ADO.NET to store the values before performing the update. That is handled by the SQL Server. When you set the flag in MMF to retrieve the primary key, it appends a select statement to the insert. Are you building you own insert statement or are you having MMF use the commandbuilder? If using the commandbuilder, you will want to set the default values of the fields or set AllowNulls to true.
Stephen Lee

--------------------------------
Too much to code
Too little time
--------------------------------
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform