Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Algorithm for generating unique value for the 6 char fie
Message
From
07/05/2001 00:38:47
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
04/05/2001 23:23:27
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00503649
Message ID:
00504067
Views:
22
>Oddly enough, in researching this I looked at Tastrade. Didja know they use APPEND BLANK in the AddNew method of the superclass? And in the DBC, there is a NewID function which grabs a sequential number from a "Setup" table.

I'm using this method lately, but newid() is not a SP, it's a separate .prg - which sort of protects me if someone is trying to add a record using plain Fox. The .prg is thus not in the database, and available only inside the .exe or our development environment. Probably a similar thing can be done with any updates, and there's the protection.

>Where this applies to your issues is that it runs headlong into a personal preference of mine: avoiding code in the DBC. I don't like procedural code in Fox DBCs, although when it comes to server databases I'm the opposite (tons of stored procs).

I've heard of the case where a programming team decided to keep all the programming logic (including business rules, RI etc) in COM objects, so if they switched from SQL to something else, they wouldn't have to rewrite all the SQL stuff. They've gone deep into SPs now, because this was dead slow, and they've all vowed loyalty to SQL anyway :)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform