are you using a version\timestamp with optimistic lock? On Fri, Mar 26, 2010 at 5:38 PM, Roger Kratz <[email protected]>wrote:
> Yes, most probably set nocount has been turned on at your production db. > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On Behalf > Of Jocke > Sent: den 26 mars 2010 13:41 > To: nhusers > Subject: [nhusers] StaleStateException > > Hi, > > we experience this error in production environment: > > NHibernate.StaleStateException: Unexpected row count: -1; expected: 1 > at > > NHibernate.AdoNet.Expectations.BasicExpectation.VerifyOutcomeNonBatched(Int32 > rowCount, IDbCommand statement) > at NHibernate.AdoNet.NonBatchingBatcher.AddToBatch(IExpectation > expectation) > > The application was launched 2 months ago and have been working fine > until recently when this error started to appear. No updates and no > inserts can be executed. I beleive that something has been changed in > the production environment but can not understand what. We made a test > by creating a new database from scratch on the same server but the > error is still there. Googling around I found that it might have to do > with SET NOCOUNT ON which as I understand it must be set to OFF, > right? NHibernate is using sp_executesql for executing the sql in this > case. From the sql profiler we see that the sql reaches the server but > cant tell if it is executed followed by a rollback or never executed > at all. > > What could possibly be causing this exception? > > Thanks, > Jocke > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
