Non-negative number required

Posts   
 
    
obzekt
User
Posts: 60
Joined: 29-Apr-2004
# Posted on: 28-Mar-2007 15:40:27   

Hello. We get this intermittent error when doing a transactional save of entities (w. Any ideas of what might cause this?

SD.LLBLGen.Pro.ORMSupportClasses.ORMQueryExecutionException: An exception was caught during the execution of an action query: Non-negative number required. Parameter name: count. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception. at SD.LLBLGen.Pro.ORMSupportClasses.ActionQuery.Execute() at SD.LLBLGen.Pro.ORMSupportClasses.DaoBase.ExecuteActionQuery(IActionQuery queryToExecute, ITransaction containingTransaction) at SD.LLBLGen.Pro.ORMSupportClasses.DaoBase.UpdateExisting(IEntityFields fields, ITransaction containingTransaction) at Commissure.Data.EntityClasses.ReportEntityBase.UpdateEntity() at SD.LLBLGen.Pro.ORMSupportClasses.DaoBase.PersistQueue(ArrayList queueToPersist, Boolean insertActions, ITransaction transactionToUse) at SD.LLBLGen.Pro.ORMSupportClasses.EntityBase.Save(IPredicate updateRestriction, Boolean recurse) at Commissure.Data.EntityClasses.ReportEntityBase.Save(IPredicate updateRestriction, Boolean recurse) at SD.LLBLGen.Pro.ORMSupportClasses.EntityBase.Save(Boolean recurse)

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 28-Mar-2007 16:05:53   

Please post the corresponding code and the generated SQL Query. To get teh SQL Query, check the LLBLGen Pro manual "Using the generated code -> Troubleshooting and debugging"

obzekt
User
Posts: 60
Joined: 29-Apr-2004
# Posted on: 03-Apr-2007 16:22:20   

This happens intermittently (once in a while in production) and I have no permission to post that code. I only ask what would cause such an error.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 03-Apr-2007 17:53:01   

This is not reproducable like 'use this and this form and it runs into this error' ?

Looks like you're setting a numeric field to a negative number, like -1, in a UI or something which is then inserted/update in the DB and this then throws an error, e.g. because the type of the field in the db doesn't allow negative numbers.

Frans Bouma | Lead developer LLBLGen Pro