-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Error using Transaction Scope and Sql Server 2005
PostPosted: Tue Jun 12, 2007 1:44 pm 
Newbie

Joined: Tue Jun 12, 2007 1:25 pm
Posts: 11
Location: Brazil
I´m having problems when I try to use the .NET 2.0 TransactionScope and SQL Server 2005, the code works fine using the SQL 2000, but when I try to use the SQL SERVER 2005 it doesn't work, and I don't know what to do.

The Error that occurs is :

"Error HRESULT E_FAIL has been returned from a call to a COM component."

And that´s a code example:


using(TransactionScope scope = new TransactionScope())
{
try
{
ISession sessao = NHibernateHelper.Fabrica.OpenSession();
sessao.Save(entidade);
sessao.Flush();
sessao.Close();

sessao = NHibernateHelper.Fabrica.OpenSession();
sessao.Save(entidade2);
sessao.Flush();
sessao.Close();

scope.Complete();

}
catch(Exception)
{
return;
}
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.