Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remote views, Tableupdate and identity keys
Message
De
20/06/2011 00:40:42
 
 
À
20/06/2011 00:24:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
MS SQL Server
Divers
Thread ID:
01515107
Message ID:
01515131
Vues:
48
How do you use scope_identity with remote views? That is the problem I've been working on and ident_current seems to be the solution there as there is a VFP transaction wrapped around this and I think there is a lock. In any case while I am in the VFP transaction SSMS cannot get SCOPE_IDENTITY or query the table or much of anything else. I am sending tableupdate and then immediately doing SPT to get IDENT_CURRENT('tablename')

If try to get SCOPE_IDENTITY in the same scenario it is null.


I just noticed a minute ago that you posted a similar question to me from another thread, and I overlooked it, sorry.

You're probably not going to like the answer (and I know that my friend from New Zealand won't like the answer much either), but I don't use remote views. I don't mean it in an overly negative way, I just don't care for certain wrappers in OLTP applications.

I am going to take a guess that in a remote view, after the update commits, the scope is lost but not the session. (And maybe you already realized that). That would explain why some functions work but scope_identity doesn't. It sounds like this is an inherent issue with RVs. (I'll be happy to be proven wrong)

Don't know if this will help, but Dmitry Litvak posted something about a year ago, related to code published from the VFP team, for using CursorAdapters to get around this issue. It's Message #1475311.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform