-->
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.  [ 2 posts ] 
Author Message
 Post subject: Is there any way how to get IDbTransaction from session
PostPosted: Thu May 26, 2005 2:41 am 
Newbie

Joined: Thu May 26, 2005 2:37 am
Posts: 3
Location: Czech Republic
Hi,
I need to update some BLOB field by manual SQL statement in the same transaction which updates my entity objects. Those BLOBs must be updated only partialy by UPDATETEXT (MS SQL), so I can't use any entity with byte array property.
When I open a hibernate session and then begin new transaction to update some entities, everything works fine. However, then I need an IDbCommand with the same transaction, so I get the command:
IDbCommand cmd = session.Connection.CreateCommand();

But I can't find any way how to get the IDbTransaction started by NHibernate session :(
This transaction must be associated with command:
cmd.Transaction = [IDbTransaction object]

Any hints?


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 26, 2005 2:22 pm 
Contributor
Contributor

Joined: Thu May 12, 2005 12:59 pm
Posts: 20
Check out the NHibernate-SDK file and look at ITransaction.Enlist(..)


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

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.