Hello,
is it possible to detect current isolation level in C/AL?
I have this problem. CURRENTTRANSACTIONTYPE always return TRANSACTIONTYPE::UpdateNoLocks. However it doesn't say if it is still BROWSE isolation level (i.e. no INSERT, MODIFY, DELETE operations occur) or isolation level is already SERIALIZABLE.
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
EXAMPLE CODE:
SET NOCOUNT ON
CREATE TABLE #Options (
[Set Option] VARCHAR(50),
[Value] VARCHAR(50))
INSERT INTO #Options
EXEC ('DBCC USEROPTIONS WITH NO_INFOMSGS')
Select * from #Options
Where [Set Option] = 'isolation level'
DROP TABLE #Options
SET NOCOUNT OFF
GO
You could take this example and create a stored procedure. Then use ADO to call it from NAV.
But if you use ADO, it will create new connection... or not? And if yes, than you cannot use it to find transaction isol. level for current NAV session...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Maybe you can create a stored procedure or function with an parameter like CurrSessionID and in the sql function you retrive the SET options of the "CurrSessionID". Theses sql function you call from C/AL -> ADO. But i'm not sure if there are exists some sys."Views" (maybe the sys.dm_tran_locks or you must join some others like the sys.dm_tran_XXX) in the master database which contains this infos.
Regards