При попытке вызвать хранимую процедуру, содержащую инструкцию SELECT, появляется следующая ошибка:
Операция недействительна для состояния транзакции
Вот структура моих звонков:
public void MyAddUpdateMethod()
{
using (TransactionScope Scope = new TransactionScope(TransactionScopeOption.RequiresNew))
{
using(SQLServer Sql = new SQLServer(this.m_connstring))
{
//do my first add update statement
//do my call to the select statement sp
bool DoesRecordExist = this.SelectStatementCall(id)
}
}
}
public bool SelectStatementCall(System.Guid id)
{
using(SQLServer Sql = new SQLServer(this.m_connstring)) //breaks on this line
{
//create parameters
//
}
}
Проблема в том, что я создал другое соединение с той же базой данных в рамках транзакции?