Quantcast
Channel: SCN: Message List - SAP Adaptive Server Enterprise (SAP ASE) for Custom Applications
Viewing all articles
Browse latest Browse all 3587

Re: Insert into hold lock and never release.

$
0
0

If I pot Set Chained ON in the SP before Insert, like:

 

CREATE PROCEDURE MyProc

AS

BEGIN

Set Chained ON

  Begin Tran ABC

     Insert into mytab(name, access_date,username, ipaddress )

     Select  'my name', getdate(), 'NA', ipaddr from master..sysprocesses where spid = @@spid 

  Commit ABC  

//Select ....

END

 

then I will get error message:

Set Chained command not allowed within multi-statement transaction.


Viewing all articles
Browse latest Browse all 3587

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>