Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remote views, Tableupdate and identity keys
Message
From
19/06/2011 17:10:45
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Remote views, Tableupdate and identity keys
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01515107
Message ID:
01515107
Views:
150
Feel like somebody here knows the answer to this :

If I send an update to the backend with SPT I can pull back the SCOPE_IDENTITY() so I can set the FKs in children before I save them.

But if I am calling Tableupdate() the SPT is created for me from the remote view and I haven't figured out how to get back the PK of the record just added.

My framework uses remote views and ultimately Tableupdate() to insert a new record on the back end. Is there a way to get the remote views themselves to return the pk value?

Once the tableupdate() returns true or false I no longer can send SPT that will see SCOPE_IDENTITY(). Do I need to munge up something with a candidate key generated on the front end in order to get back the pk of the record just inserted?

Remember, these are remote views. I understand how to do it in SPT but the tableupdate doesn't provide a place I can see to ask for scope_identity in the same scope.

TIA


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Next
Reply
Map
View

Click here to load this message in the networking platform