martindavey
Programmer
Hi,
I'm using ADO to insert a row onto my Access DB.
I'm having a problem when the column name contains a space.
I get the following error...
"Item cannot be found in the collection, etc."
...when I execute the following:
lArrayIndex[0] = 0;
vaFieldlist.PutElement(lArrayIndex,&(_variant_t("AC ID"));
I've also tried:
sprintf(temp,"\"AC ID\""
lArrayIndex[0] = 0;
vaFieldlist.PutElement(lArrayIndex,&(_variant_t(temp)));
And I've tried:
lArrayIndex[0] = 0;
vaFieldlist.PutElement(lArrayIndex,&(_variant_t("'AC ID'"));
PS. The last part of the code is:
lArrayIndex[0] = 0;
vaValuelist.PutElement(lArrayIndex,&(_variant_t(strACID)));
m_pDestRecordSet->AddNew( vaFieldlist, vaValuelist );
All the above works if the column is called
ACID instead of AC ID
Martin :O)
I'm using ADO to insert a row onto my Access DB.
I'm having a problem when the column name contains a space.
I get the following error...
"Item cannot be found in the collection, etc."
...when I execute the following:
lArrayIndex[0] = 0;
vaFieldlist.PutElement(lArrayIndex,&(_variant_t("AC ID"));
I've also tried:
sprintf(temp,"\"AC ID\""
lArrayIndex[0] = 0;
vaFieldlist.PutElement(lArrayIndex,&(_variant_t(temp)));
And I've tried:
lArrayIndex[0] = 0;
vaFieldlist.PutElement(lArrayIndex,&(_variant_t("'AC ID'"));
PS. The last part of the code is:
lArrayIndex[0] = 0;
vaValuelist.PutElement(lArrayIndex,&(_variant_t(strACID)));
m_pDestRecordSet->AddNew( vaFieldlist, vaValuelist );
All the above works if the column is called
ACID instead of AC ID
Martin :O)