B
Benjamin Joldersma
Hello all,
I've searched the forum for this error, but there are only two posts
on the topic. We are seeing something very strange happening. We
have a DataView with a Sort property specified to a two column
expression:
DataView dv = new DataView( sourcetable );
dv.Sort = "ContentTypeId,ContentId";
//then we create our search array:
object[] searchKeys = new object[2]{ 9, 2 };
//and run our search:
if( dv.Find( searchKeys ) > -1 )
{
....
}
//never gets inside the if loop, error:
Expecting 2 value(s) for the key being indexed, but received 1
value(s).
but the really interesting thing is that if we change the sort key in
the command window to a single key, and pass in the same array, we get
the opposite error:
dv.Sort = "ContentTypeId";
if( dv.Find( searchKeys ) > -1 )
{
....
}
we get this error:
Expecting 1 value(s) for the key being indexed, but received 2
value(s).
Can anyone shed any light on this topic? We are using a DefaultView
on a datatable, and it is a static member of our class in an ASP.NET
HttpModule ocntext.
thanks in advance!
Benjamin Joldersma
Sr. Software Engineer,
Citadel Media, Inc.
I've searched the forum for this error, but there are only two posts
on the topic. We are seeing something very strange happening. We
have a DataView with a Sort property specified to a two column
expression:
DataView dv = new DataView( sourcetable );
dv.Sort = "ContentTypeId,ContentId";
//then we create our search array:
object[] searchKeys = new object[2]{ 9, 2 };
//and run our search:
if( dv.Find( searchKeys ) > -1 )
{
....
}
//never gets inside the if loop, error:
Expecting 2 value(s) for the key being indexed, but received 1
value(s).
but the really interesting thing is that if we change the sort key in
the command window to a single key, and pass in the same array, we get
the opposite error:
dv.Sort = "ContentTypeId";
if( dv.Find( searchKeys ) > -1 )
{
....
}
we get this error:
Expecting 1 value(s) for the key being indexed, but received 2
value(s).
Can anyone shed any light on this topic? We are using a DefaultView
on a datatable, and it is a static member of our class in an ASP.NET
HttpModule ocntext.
thanks in advance!
Benjamin Joldersma
Sr. Software Engineer,
Citadel Media, Inc.