Hi all,
i'm not quite shure if this is really the right place to ask my question, but maybe someone has made similary experiences.
First a short description of my system environment:
NHibernate 1.0.4
SqlServer 2000 SP4 on Windows Server 2003
.Net Framerwork 1.1
The code is a server process which runs under IIS 6.0 and is called via .NET-Remoting.
I have following Criteria query:
Code:
ICriteria criteria = session.CreateCriteria(typeof(PriPricing));
criteria = criteria.Add( Expression.Eq(PriPricing.PRICEVARIANT_ID, pPricevariantId));
criteria = criteria.Add( Expression.Not(Expression.In( PriPricing.GMS_MATERIALNUMBER, pMatnoList)));
criteria = criteria.Add( Expression.Not(Expression.In( PriPricing.MATERIAL_DESCRIPTION, pMatDescList)));
pMatnoList and pMatDescList are StringCollections which may contain several hundreds of entries. Each entry will have a maximum lenght of 50 characters. Sometimes the query fails with following exception:
Code:
NHibernate.ADOException: Unable to perform find ---> System.Data.SqlClient.SqlException: A severe error occurred on the current command. The results, if any, should be discarded.
If i look at the server log i find
Code:
2007-08-23 09:30:31.47 spid75 Error: 17805, Severity: 20, State: 3
There is a knowledgbase article on MSDN (
http://support.microsoft.com/kb/827366) regarding this issue, but i can't believe that one of the issues mentioned there causes the issue.
Regardless of the meaningfulness of an "IN"-query with several hundreds of values i have tried id out in the query analyzer and found that it will work in principle.
If anyone had similar problems and found a solution for it i will be glad to hear from him.
Regards
Klaus