Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

ALTER DATABASE statement in ESQL gets "not allowed in multi-statement transaction"?

$
0
0
I am connecting to MSSQL 2012 from a managed console program using OpenESQL and ADO. I need to completely replace the data in several tables from some data files. I wrote a proof-of-concept that connected, truncated, read-and-inserted, committed and disconnected. It worked great. But in our production environment I need to minimize the volume of the database log files by temporarily shifting db RECOVERY from FULL to SIMPLE, and then shift it back after the loading is done. My "EXEC SQL ALTER DATABASE NEAS SET RECOVERY SIMPLE END-EXEC" statement returns with SQLCODE -226, SQLSTATE IM999 and MFSQLMESSAGETEXT "ALTER DATABASE statement not allowed within multi-statement transaction." Can anyone shed some light on this? VC 2.3.2 for VS 2013 on Windows 7.

Viewing all articles
Browse latest Browse all 4356

Trending Articles



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