Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Default unique ID values for a field in a remote table ?
Message
From
02/06/1998 12:10:03
 
 
To
02/06/1998 12:01:13
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00103696
Message ID:
00104048
Views:
44
>>Well, this stuff depends on the approach you apply when you save a new record. My preference is to generate NewId after all validations made, i.e. the only chance that INSERT will fail is network hardware problem, i.e. normally it will go Ok 99%, and some 'holes' is not a problem as long as database uses surrogate primary/foreign keys.
>
>Right, I'd call NewId just after my validation, but I don't share your confidence over network hardware problems. Add some kernel32 problems with Word97, some problems with W95 and I could talk about 70%....
>And for this particular app I *must* avoid 'holes' because I won't use surrogate primary keys (for compatibility reasons).
>
>>PS. When you 'RETURN nNewid', it means that you get it back to your code.
>
>Hey ! I know it ! :)
>But if I'm going to use it on a stored procedure that executes as the Default field value for the table, I won't be able to get the value back, because I'm not calling it from my code...

If you type procedure name as default field value in table designer (personally, i wouldn't use for primary key generation) then the procedure return value will be used as default value, right?
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform