SQL Server - error occured while creating the zip file from xml files

Asked By brahma naidu on 15-Mar-12 05:06 AM
.NET Framework execution was aborted by escalation policy because of out of memory. 
  System.Threading.ThreadAbortException: Thread was being aborted. 
 System.Threading.ThreadAbortException:  at System.Data.SqlTypes.SqlChars.get_Value() 
 

will u plz guide me how solve this problem.
Abhinav Sejpal replied to brahma naidu on 19-Mar-12 04:24 PM
Hi,

I believe, you may resolved the problem by using this code in your script

 Logging.DebugEvent.Raise(Me.GetType.Namespace, Reflection.MethodBase.GetCurrentMethod().Name, _
                 "Report data recieved from database")

This is a call to a Application Block (MS enterprise library) for logging events to flat files (in this case) or event logs.

This one, in between the ExecuteXMLReader() and the actual usage of the reader in the XML document, was sometimes failing harshly, causing the whole thread to abort. I moved the line to after the _xmlReader.Close() and it took care of the problem.