Save a _RecordsetPtr into map
-
Hello, I have a recordset which contains a lot of data , I need to save it into map or any kind of dictionnary (which have a key and other data) I have for example :
pRecordset->MoveFirst();
while (!pRecordset->EndOfFile)
{
vIdTrans =pRecordset->Fields->Item["id_translation"]->Value;
vCaption =pRecordset->Fields->Item["id_caption"]->Value;
vLang =pRecordset->Fields->Item["id_language"]->Value;
vTranslation =pRecordset->Fields->Item["translation_text"]->Value;strIdTrans = CUtils::GetVariantAsCString(vIdTrans);
strCaption = CUtils::GetVariantAsCString(vCaption);
strLang = CUtils::GetVariantAsCString(vLang);
strTranslation = CUtils::GetVariantAsCString(vTranslation);// What I have here is :
- id_translation : key of table
- id_caption and id_language are REFERENCES from other tables.
- translation_text : data
So , what I need after is getting data by (id_caption and id_language) and it will be more better if (id_caption, id_language and id_translation)
how do that ?
} -
Hello, I have a recordset which contains a lot of data , I need to save it into map or any kind of dictionnary (which have a key and other data) I have for example :
pRecordset->MoveFirst();
while (!pRecordset->EndOfFile)
{
vIdTrans =pRecordset->Fields->Item["id_translation"]->Value;
vCaption =pRecordset->Fields->Item["id_caption"]->Value;
vLang =pRecordset->Fields->Item["id_language"]->Value;
vTranslation =pRecordset->Fields->Item["translation_text"]->Value;strIdTrans = CUtils::GetVariantAsCString(vIdTrans);
strCaption = CUtils::GetVariantAsCString(vCaption);
strLang = CUtils::GetVariantAsCString(vLang);
strTranslation = CUtils::GetVariantAsCString(vTranslation);// What I have here is :
- id_translation : key of table
- id_caption and id_language are REFERENCES from other tables.
- translation_text : data
So , what I need after is getting data by (id_caption and id_language) and it will be more better if (id_caption, id_language and id_translation)
how do that ?
}