This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello, I need to write an TSQL Stored Procedure. This SP will insert new rows in tables. This database persists lightspeed entities using the KeyTable method. Please, how I can safely get the nextId value from my Stored Procedure ? Thanks in advance. Jonathan. |
|
|
Within LightSpeed we fetch and then update the KeyTable within a seperate transaction scope where the initial select operation takes out an update lock so we can maintain consistency when updating. e.g.
So I would look at using a similar approach :) Your next value should be scoped by the amount of id's you are resevering for your operation - grab as many as you are going to need to avoid having to update the keytable many times.
|
|
|
Thx Jerem ! |
|