Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unique ID's in inventory systems
Message
From
19/05/1999 07:27:06
Rex Mahel
Realm Software, Llc
Ohio, United States
 
 
To
18/05/1999 17:45:15
Jorge Haro
Independent Consultant
Juarez, Mexico
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00220153
Message ID:
00220335
Views:
29
>My key generation program is also called newid(), a friend pased it to me, and I know he got it from someone else :), I've made some changes to it, among them, I took it out of the DBC procedures into it's own prg.

If you use the NewId function in the DefaultValue of the PK, you should leave the function in the DBC. That way you code it once and forget it. Otherwise you run the risk of not having the code available when adding a new record outside your application or forgetting to SET PROCEDURE to the .PRG file.

Encapsulation is a wonderful thing.

Just my $0.02

Rex
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform