>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.