Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
When to assign unique key.
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00058229
Message ID:
00059703
Views:
36
>Thanks to both you Jerimi and Erik for your replies. I've created the stored procedure in my database and created an IDS table as well. Instead of assigning the key in the fields Default Value I assign just before the TABLEUPDATE() with REPLACE Suppliernum WITH NewId(). This works great in development but when I compile to a EXE I get the error 'Program NewId does not exist'. Am I missing a particular setting to make the app look in the stored procedures? My PATH includes the data directory.

I would put the NewID() in a common library of functions, that way you could access it.
The only thing bad about not doing it in the "Default Value" is the fact that you can not do an APPEND FROM or INSERT INTO (with multiple), because you could violate the PRIMARY index, so that may be something to consider.
When it is in the "Default Value" field it assures uniqueness, however if you start adding and then cancel, you do lose and ID, but hey there are a bunch...:)

Jerimi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform