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.  [ 3 posts ] 
Author Message
 Post subject: problem with triggers
PostPosted: Mon Feb 25, 2008 2:54 am 
Newbie

Joined: Wed Jun 14, 2006 10:31 am
Posts: 6
Hi all!
I have this problem
in my sql server 2005 express edition table I have a trigger that update another table when the table have an insert/update.
if I insert a record with NHibernate gives an error due to the fact that are 2 records updated/inserted and not one...
how can I fix this??

thanks again!

here is my code:
Code:
session.Save(myTableObject);
transaction.Commit();
session.Close();



thanks in advance!

ghiboz

_________________
www.rbr-online.net


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 25, 2008 4:23 am 
Expert
Expert

Joined: Tue Aug 23, 2005 5:52 am
Posts: 335
You need to add SET NOCOUNT ON at the beginning of your trigger.

Cheers,

Symon.

_________________
Symon Rottem
http://blog.symbiotic-development.com


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 25, 2008 4:28 am 
Newbie

Joined: Wed Jun 14, 2006 10:31 am
Posts: 6
merge_s.rottem wrote:
You need to add SET NOCOUNT ON at the beginning of your trigger.

Cheers,

Symon.

thanks mate!
it works!!
another question... i looked into the nhibernate source... how can I do to to use ExecuteUpdateResultCheckStyle.None instead of ExecuteUpdateResultCheckStyle.Count??

thanks again!

_________________
www.rbr-online.net


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.