Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Generating unique Order No
Message
From
18/06/2009 19:42:13
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01406619
Message ID:
01407043
Views:
24
>Thanks, Hilmar. Nice point about PADR - I may need to adjust my procedure.

Note that my procedure creates the sequence if it doesn't exist. You don't have to adjust the sequence table manually - unless there is some unforeseen problem, or business procedures mandate that the sequence start at a certain value other than 1.

For a primary table, I just create the new table, and set the default value for the primary key to SerialNumber("MyNewTable"). That's all.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform