Mittal Sejpal

Mittal Sejpal

  • NA
  • 134
  • 112.3k

'System.OutOfMemoryException' was thrown. (mscorlib) in Sql Server 2008

Oct 7 2011 1:21 AM

I am the following error on running a script!!!

===================================




Cannot execute script.

===================================

Exception of type 'System.OutOfMemoryException' was thrown. (mscorlib)

------------------------------
Program Location:

   at System.String.GetStringForStringBuilder(String value, Int32 startIndex, Int32 length, Int32 capacity)
   at System.Text.StringBuilder..ctor(String value, Int32 startIndex, Int32 length, Int32 capacity)
   at System.Runtime.InteropServices.Marshal.PtrToStringUni(IntPtr ptr)
   at Microsoft.SqlServer.Management.UI.VSIntegration.ShellTextBuffer.GetText(Int32 startPosition, Int32 chars)
   at Microsoft.SqlServer.Management.UI.VSIntegration.ShellTextBuffer.get_Text()
   at Microsoft.SqlServer.Management.UI.VSIntegration.ShellCodeWindowControl.GetSelectedTextSpan()
   at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptEditorControl.GetSelectedTextSpan()
   at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptAndResultsEditorControl.OnExecScript(Object sender, EventArgs a)

Thanks in advance!!!

Answers (4)