Back to list
Views:   0
Replies:  0
Archived
,
Reply 1
Kim:

Can you explain what you mean when you have primary keys that are surrogate keys but not identity? 
The question is who generates the surrogate key, that database or the code?

Basically when you save a record, you want to have the code generate the key (say a GUID), or the database generate the key (using Identity or autonumber).  In the first case you have the primary key immediately and not special actions are required. In the second case you need to retrieve it immediately following INSERT by using SELECT @@IDENTITY or something similar (depending on your db and db version).

Hope this gets you going.
Trey Henlon, Jun 07, 2011
public abstract class ComputingMachine //or AbstractCalculator { } Then inherit all calculators from ComputingMachine.
Jan 19, 2012
Suppose I have to design different type of calculators, then what should I use as my base, an abstract class or an interface and why?
Feb 23, 2011
This is a good down to earth analogy.
Feb 16, 2011
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Licensing       EULA       Sitemap      
© Data & Object Factory, LLC.
Made with    in Austin, Texas