Gary, Your (Max+1) routine works fine, until the day when you run into VFP buffering when the records can be held in memory and not flushed out to disk. This occurs during begin transaction.....end transaction and even spuriously when using standard VFP procedural instructions, especially in multi-user situations.
Horses for courses I guess, but I would never use it. My preferred method is a UDF() that interrogates a table holding one record for each table in the system and it's next primary key. Access the relevant record, lock it for a short period of time whilst incrementing the next sequential record then unlock and return back the PK. This works faultlessly in Multi user systems. Dave -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Gary Jeurink Sent: 24 August 2012 16:55 To: 'ProFox Email List' Subject: RE: auto increment A lot of information. Thanks. For now, the max+1 will work as long as I use an unfiltered list so that updates through view update only their key record but logging in users I use a username and encrypted password. They never see their actual member number id. So is it okay to stay simple with user-id if the security is really at the gate with user-name & password to get in? Gary Jeurink -----Original Message----- From: Alan Bourke [mailto:[email protected]] Sent: Friday, August 24, 2012 9:31 AM To: [email protected] Subject: Re: auto increment On Fri, Aug 24, 2012, at 02:44 PM, Lew Schwartz wrote: > I never understood why these routines would be any better than max()+1. > Because they are GUIDs - globally unique. That fact is very important in some applications, but overkill for a lot of others. -- Alan Bourke alanpbourke (at) fastmail (dot) fm [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

