- This topic has 2 replies, 2 voices, and was last updated 6 years, 1 month ago by .
Viewing 2 reply threads
Viewing 2 reply threads
- You must be logged in to reply to this topic.
Hello Kim
How can I “resolve” changes on the server using the following?
<div>SET IDENTITY_INSERT sometableWithIdentity ON</div>
<div>INSERT sometableWithIdentity (IdentityColumn, col2, col3, …)VALUES (AnIdentityValue, col2value, col3value, …)</div>
<div>SET IDENTITY_INSERT sometableWithIdentity OFF</div>
<div></div>
<div>Using the components of KbmMW, TbkMWClientQuery while doing the normal open, append, post, resolve.</div>
Thanks in advance.
Best regards
Job Espejel
Hi,
You can write an eventhandler on the resolver’s OnBeforeObjectOperation and OnAfterObjectOperation.
Check if its state is mwrssInsert, and if your resolver is being used for other resolving, you probably also need to check if its that particular situation you want to interfere with the operation.
Then in the OnBeforeObjectOperation execute your SET IDENTITY… ON on the connection that is provided by the Sender.
Similarly with the SET IDENTITY…. OFF in the OnAfterObjectOperation event.
best regards
Kim/C4D
thanks !!