I agree that GUID and auto-increment are the best, however a benefit of using a GUID is you can predetermine what the value is in your business layer before you hit the database, and don't have to worry about retrieving the ID back when running the insert.
On 19 Nov, 16:23, Cerebrus <[EMAIL PROTECTED]> wrote: > Although the guys have touched on most of the possibilities already, > personally I'm usually most inclined to choose between one of those > two : GuID or Auto-increment - both set by the DB itself. > > On Nov 19, 9:05 am, "Brandon Betances" <[EMAIL PROTECTED]> wrote: > > > > > I believe the OP mentioned SQL in his post. The best way, both from a > > programming standpoint, and a DBA standpoint, is to create either a GUID > > field, or a primary key "int" field with auto-increment, set the seed and > > increment as you see fit. > > > On Tue, Nov 18, 2008 at 8:10 AM, Gururaj Balagar > > <[EMAIL PROTECTED]>wrote: > > > > Use Squence No,(Or Autogenerate No) in database then U cancat to the BIgJ > > > > On 11/18/08, BigJ <[EMAIL PROTECTED]> wrote: > > > >> I see a formula section, but not sure how to go about it. I basically > > >> have an primary key called "EntryId" and I want to consist of UserId > > >> +unique counter, so if UserId="BigJ", and it's my first entry, then > > >> EntryId="BigJ1" and the next entry would be BigJ2 etc....any insight > > >> as to how to accomplish this? I know there is a formula field and I am > > >> looking into it, but any insight or simple examples are apreciated, as > > >> I left my SQL book at home lol...Thanks...- Hide quoted text - > > - Show quoted text -
