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:
00059705
Views:
35
>>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

Thanks for the info Jerimi. Since FoxPro 2 I've had all common UDF's in one PRG accessed using SET PROC TO. Even in VFP sometimes the oldest proven solutions are still the best :-)

Thanks again.
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform