Reputation: 2028
Strange problem that just starting to happen on a SL/WCF RIA Services project that I have been working on for the past year. Recently I have been getting this message everytime I fix a bug and re-run the application.
Load operation failed for query 'GetDepartments'. An error occurred while executing the command definition. See the inner exception for details. InnerException message: Batch execution is terminated because of debugger request.
If I "Clean" solution, and then start the application, everything then works again.
I've tried to isloate the exact error, but it occurs during a call back of the Load operation, and I'm not sure what is going on.
I turned on SQL Profiler, and the query looks the same and I don't think I'm having an issue at the server.
Any hints would be appreciated. It takes too long to build already!
R
Upvotes: 3
Views: 282
Reputation: 9789
The fact that cleaning the solution helps could mean one of two things:
Upvotes: 1
Reputation: 1433
The prevoius answer should help. This is linked to the load operation, because this method query the underlying database (perhaps through an ORM but that doesn't matter, it's important just where the SqlConnection is opened).
If you need the sql server debugging, take a look at this link from MS, that explains how to set up it (You 'll need administrator privileges)
As far as the "clean solution" is concerned, I GUESS that it is related to pdb mismatch with the assembly executed, (the assembly that is running in the process where VS debuger is attached) this would disable the debugging for that assembly, thus, you don't incur in the exception.
Hope this helps,
Marco
Upvotes: 1
Reputation: 3766
Try disabling SQL debugging, just for the heck of it:
Project Properties > Debug > [uncheck] Enable SQL Server debugging
Upvotes: 1