PK that is not @@Identity or Scope_Identity

Posts   
 
    
ianvink
User
Posts: 394
Joined: 15-Dec-2006
# Posted on: 27-Jun-2007 15:44:52   

I have a Sale object that has a PK 'SaleID'. Before a Sale is saved, I have to call a proc to get the SaleID and apply that to Sale.SaleID. SaleID is recognized by the designer as the PK / FK on children.

The Sale has a child object SaleInfo linked on SaleInfo.SaleID = Sale.SaleID. SaleInfo has a child MoreSaleInfo linked on both SaleID AND SaleInfoID PKs.

Question: When I call Sale.Save() , I can set the SaleID. Does this setting of Sale.SaleID automatically update the SaleInfo.SaleID and and MoreSaleID.SaleID?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 27-Jun-2007 15:53:39   

Isn't this the same question as in: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=10333

Anyway, I think it should work.