Hello,
I'm not sure if this problem is from the abp but How can I execute a procedure with Liked server?
I'm getting the following error:
Unable to start a nested transaction for OLE DB provider "SQLNCLI10" for linked server "PINE_SQL". A nested transaction was required because the XACT_ABORT option was set to OFF. OLE DB provider "SQLNCLI10" for linked server "PINE_SQL" returned message "Cannot start more transactions on this session.".
My code on the Repository:
Session.CreateSQLQuery(
"EXEC BoletadorAtivos.dbo.blt_IntegracaoFuncaoCapitalGiroRegistro_sp @Operacao_ID = N'" + Operacao_ID + "'")
.ExecuteUpdate();
I just use the CreateSQLQuery from nhibernate.
My procedure tries to do an INSERT on another BD using Linked Server but fails, only SELECTS works with Linked Server.
Anybody has a clue why?
Thanks
3 Answer(s)
-
0
Hi,
This is not related to ABP, as you guess. I think probability of finding an answer harder in this forum since ABP community generally uses EF. You cam try to find on stackoverflow or similar sites.
Thanks.
-
0
Yes, sorry about that. I found it, will post here the answer if somebody needs, or you can delete the thread.
Thanks
SET XACT_ABORT { ON | OFF }
-
0
Thank you for information sharing ;)