|
Posted by helmut woess on 09/27/05 11:55
Am Tue, 20 Sep 2005 12:39:32 GMT schrieb Dan Guzman:
> As Erland mentioned, the bug hasn't yet been addressed. Your UDF
> work-around is probably the best apporach.
>
> May I ask why you need to use IDENT_CURRENT? The function has a global
> scope so it needs to be used with caution in a multi-user environment.
Hello,
sorry for delay, but i was tied up with vacation :-))
The reason why i read this value in my application is as following:
All records own an identity field (which is always the primary key), which
is used to log all data activities in a log table which has an identity
field too. When i add a new record, then this record gets its identity
value and the trigger afterwards logs this insert into the log table which
creates a new record in the log table. But this insert in the log table
changes @@IDENTITY, and the ado component in my application gets this value
as new identity value, not the value from the original insert - i needed
some days to find out this behaviour. And my grid for displaying the data
jumps to the wrong record ...
So i read this value before i do the post and after posting the data i do a
refresh of the data and a repositioning in the grid to the identity value i
got with reading ident_current before.
So if something goes wrong the worst case could be that the grid shows a
wrong record. But because in my application every record has a lot of data
to set and everything has to be done by hand and there are max. 3 users at
the same time adding records into the same table i can live with this risk.
bye,
Helmut
Navigation:
[Reply to this message]
|