ADO DoDataExchange
-
terça-feira, 28 de fevereiro de 2012 10:13
I'm currently rewriting an application that uses the Dao interface to make it use the ADO interface.
When opening a recordset with Dao, the DoFieldExchange void is executed.
DoFieldExchange exchanges all membervariables with the data from the recordset.
Here's an example...
void CAbkzRecordset::DoFieldExchange(CDaoFieldExchange* pFX) { //{{AFX_FIELD_MAP(CAbkzRecordset) pFX->SetFieldType(CDaoFieldExchange::outputColumn); DFX_Text(pFX, _T("[Abkürzung]"), m_Abk_rzung); DFX_Text(pFX, _T("[Bedeutung]"), m_Bedeutung); DFX_Text(pFX, _T("[Kategorie]"), m_Kategorie); //}}AFX_FIELD_MAP }
m_X are membervariables of the class.
Abkürzung/Bedeutung/Kategorie are the column names of the table that is opened.
Now, I want to do such dataexchange using ADO. However, when opening a recordset it does not automatically call a similiar event(I did try DoDataExchange void).
Do you guys have any idea how to do such data exchange in ADO when opening a recordset?
As further information, the table has 800K rows.
Todas as Respostas
-
sexta-feira, 2 de março de 2012 06:08
-
segunda-feira, 5 de março de 2012 09:32
http://msdn.microsoft.com/en-us/library/ca5a16kd(v=vs.100).aspx
That probably works fine with ODBC. I'm not working with ODBC tho and I am neither working with CRecordsets.
When calling MoveNext or Open or any similar function, "DoFieldExchange" does not trigger.
http://www.codeproject.com/KB/database/caaadoclass1.aspx?msg=1793611

