hi there,
I build an ActiveX Control, inside this control I use an ADO Recordset and at one moment I need to add a new record
I use this code, listed below, but with no success
what can I do?

typedef vector<CString> vFieldNames;
vFieldNames vFNames; //I have values in that vector

unsigned int el;
long ix[1];
SAFEARRAY *pSa=NULL;
el=vFNames.size();
_variant_t v;

pSa=SafeArrayCreateVector(VT_VARIANT,1,el);
for(int ii=0;ii<el;ii++ )
{
v=vFNames[ii];
ix[0]=ii;
SafeArrayPutElement(pSa,ix,&v);
}
_variant_t vFieldlist;
_variant_t vValuelist;
vFieldlist.parray=pSa;
vValuelist.parray=pSa;
//the values are the names of the fields for simplicity

hr=rsSpoturi->AddNew(vFieldlist,vValuelist);
if(FAILED(hr)) ATLTRACE("Eroare AddNew");





thanks in advance for your help