SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

MOSS2007 with SP3.

I have a list with many items. From code I get items using simple criteria. (give me all products that have DeliveryDate between in a specific time interval and the field Customer not null) For this I build a CAML query and use it in code (mList.GetItems(query)).

Before having 2000 items all was OK.

Now I have 2077 items and the error that I receive is “Unknown SQL Exception 4104 occured. Additional error information from SQL Server is included below. The multi-part identifier "t16.nvarchar1" could not be bound.”

Checked on the internet and hoped that a last service pack will solve the problem. But problem persist. Checked the same simple query in CAML Builder.... same error. If I remove items until I have only 1999 in the list the issue is gone.

What can I do?

Now in the UI I did a new View that will display all items (set RowLimit to 5000 to be sure) and this work ok, all items are displayed. - I cannot use this view in code because I have to add dinamicaly difrent filter criterias.

But I need to return items in again what is to be done ?

share|improve this question
up vote 0 down vote accepted

Ok, so it seems there is a problem with a lookup field of type "User". If this field is used in filter criteria and also in OrderBy I receive the error.

Now my workaround is to get the items without any OrderBy criteria. After that put them into a DataTable and create a DataView from this. Then I use Sort method from DataView to have the items sorted. Then using a foreach I go to each DataRowView and display the required field values.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.