I use SQL Server CE with ADOCE.
Seek() works fine with index on one column, but return error when the index is on 2 and more columns:

the code is as follows:
------------------------------------------------
long j;
SAFEARRAYBOUND bound[1];
SAFEARRAY *array;
COleVariant var;
VARIANT arr;
VariantInit(&arr);

bound[0].cElements = 2;
bound[0].lLbound = 0;
array = SafeArrayCreate(VT_VARIANT,1,bound);

j = 0;
var.vt = VT_I4;
var.lVal = 2;
hr = SafeArrayPutElement(array,&j,&var);

j = 1;
var.vt = VT_I4;
var.lVal = 2634;
hr = SafeArrayPutElement(array,&j,&var);

V_VT(&arr) = VT_ARRAY | VT_VARIANT;
V_ARRAY(&arr) = array;

hr = adoRecordset.m_pIADORS->Seek(arr, adSeekFirstEQ);


// hr = -2147024809 (Invalid parameter)
---------------------------------------------------
can anyone help?