Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sequential ID's
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
Miscellaneous
Thread ID:
00545804
Message ID:
00546459
Views:
17
Rod,

>Does anyone have a method within Mere Mortals to implement sequential id's so that it doesn't use an id every time that you go into a form (such as a find form)? I've got a client that want's to have everything sequential with no missing id's.>

By default, the business objects are pre-fetching unique IDs. You can change this behavior in all business objects by overriding the OnNew() method in your app-level business object with the following code:

LPARAMETERS tlManualCall

IF tlManualCall
RETURN DODEFAULT()
ENDIF

This causes the OnNew() method to only be run when OnNew() is called manually with a .T. parameter. You can now call this method manually from another method in the business object such as PostSaveHook().

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform