Home Forums SQL Server 2008 T-SQL (SS2K8) Sql Server 2008 R2 Error: An error occurred while executing batch. Error message is: Error creating window handle. RE: Sql Server 2008 R2 Error: An error occurred while executing batch. Error message is: Error creating window handle.

  • Hi Teee,

    I did not run your procedure but with large queries and/or lots of outputs you should first set "Results to Text".

    Otherwise you run into this error, which basically means you are running out of memory. :w00t:

    Edit: MS also encourages to SET NOCOUNT ON in procedures.

    Enjoy,

    Sparky