I am getting the following error when I try to call a stored procedure that contains a SELECT Statement:
The operation is not valid for the state of t
For me, this error came up when I was trying to rollback a transaction block after encountering an exception, inside another transaction block.
All I had to do to fix it was to remove my inner transaction block.
Things can get quite messy when using nested transactions, best to avoid this and just restructure your code.