August 28, 2006 at 10:30 am
Hello Everyone,
We receive this error with ADO.NET:
The query processor could not produce a query plan from the optimizer because a query cannot update a text, ntext, or image column and a clustering key at the same time.
Is it a known restriction?
Why arewe able to do the same thing in Query Analyzer without problem?
Regards.
Carl
August 31, 2006 at 6:31 am
Found my answers on the internet (thanks google).
To have this error there must be several conditions met:
- Having a table with a cluster index and a column of datatype image or text.
- The text or image data must be too large to be stored directly in the row.
- The execution plan chosen must let the optimizer thinks there is more than one row to update (eventhough there is only one row upadted).
I found 2 viable solutions for us :
1 - Remove the clustered index : We do not want this solution (impact on performances)
2 - Adding a primary key constraint on the column that was used in the where clause of the update (we knew that this column was unique and does not allow null values).
With the second solution the optimizer now know (execution plan) that there will be only one row updated. It seems that the unique index previously present was not enough.
Regards.
Carl
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply