Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Default unique ID values for a field in a remote table ?
Message
De
02/06/1998 11:19:33
 
 
À
02/06/1998 08:49:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00103696
Message ID:
00104017
Vues:
41
>It's not me, it's MS and universe :)
>

Ah, then it's ok... ;-) Jokes apart, I'll follow your advice, thanks !

>>But suppose that I won't have the opportunity to work on remote VFP tables but only through ODBC. What should I do to lock the remote table ?
>
>You could try to call VFP stored procedure which will place a lock, but I'm really unsure whether it's possible, it's really abnormal way.

Sure, I don't want Frankenstein procedures.
So, assume that I'm going to use a stored procedure on the server to generate the default ID as soon as the record is written on the table via TableUpdate() (and no, I'm not calling it), like the NewID() function found in the Solutions example. All ok, the procedure locks the table, updates the ID and then saves it as ID for my new record. BUT, how could I be able to know this new id?

Take your suggestion to use local views and local tables : I could open the lookup table exclusively, read the current_id, change it to current_id + 1, use it as the new id for the record I'm going to update, update that record, update the lookup table, close the lookup table. Would it be acceptable ?
I don't like it too much, because the exclusive lock could be dangerous...
Sincerely,

Andrea Brajuka
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform