Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RetrieveAutoIncrementPK
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01516689
Message ID:
01516936
Views:
51
>Hello. I'm using SQL Server 2008. I have 2 tables in this example. Both tables have a primary key filed. Identity Specification is set to true on both tables primary key fiellds.
>
>In my application I have Me.RetrieveAutoIncrementPK = True in the ABusinessObject class.
>
>On my form I have 2 business objects. One is the primary business object and one is just a business object. When I add a new record the primary business objects primary key field is being set with the next primary key value from the database. The "Regular" business objects primary key is being set to 0. I'm expecting it to be set to 2 since that's the next primary key in that table.
>
>Thanks.
Robert,
Naomi is right that you should have the PK in SQL Server set up as an identity field and marked as the primary key. You also need to have the primary key identified in your business object.
Linda
Linda Harmes
HiBit Technologies, Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform