To create unique sampleID i am using GUID from .net library While creating sampleojbect as follows SampleObject.Save()
On Oct 5, 6:46 pm, Markus Zywitza <[email protected]> wrote: > How do you create the unique SampleID? > > -Markus > > 2009/10/5 raghavsri <[email protected]> > > > > > > > Hi > > I have data model as follows > > Specimen and Test table ,sample has 1-many relationship with test > > table. > > > Specimen Table as following columns( SID(PK), SampleID(UK)) ; Test > > Table (TID(PK),SID(FK)) > > > When i save sampleObject.Save() it inserts one row in sample and one > > row in test table successfully. > > > But when i create multiple threads and i try to save sample with same > > SampleID it gives > > > Violation of UNIQUE KEY constraint , > > > If i do sequnetially i can insert as many rows in Test Table for a > > given sampleID > > > Can any one help me why it is not wokring when do the same operation > > concurrently.. > > > Regards- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
