Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remote views, Tableupdate and identity keys
Message
From
20/06/2011 00:27:03
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01515107
Message ID:
01515130
Views:
52
>>>We're using SELECT @@IDENTITY right after the statement, but we use this only on the tables that don't have triggers. I don't like this solution much, but I don't see a better alternative. IDENT_CURRENT has its own problems.
>>>
>>>
>>>Out of curiosity (and maybe you answered this in another message and I missed it)....why aren't you using SCOPE_IDENTITY?
>>>
>>>Most of the environments I've been in, IDENT_CURRENT would not have been practical at all, for the reasons you stated.
>>
>>SCOPE_IDENTITY() does not work calling by itself :( In other words, if we're using Remote Views and tableupdate, I think there is no other choice.
>>
>>BTW, I think I did ask this question myself some time ago and didn't get an answer...
>>
>>This is my thread on this topic
>>
>>Re: SPT, updatable cursor and last identity value Thread #1458392 Message #1458444
>
>Actually, I just re-read Fabio's suggestion
>Re: SPT, updatable cursor and last identity value Thread #1458392 Message #1459209
>
>I don't think I've tried that, but it does indeed sounds like a solution and I should have tried this instead of keeping the original code.

I don't get why he is getting scope identity if the tableupdate fails?


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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform