初步的想法是用两个recordset,一个从SQL取数据,一个往Access里面插入数据
因为表的字段比较多,所以只好用一个循环
while (!m_pRecordset_sql->adoEOF)
{
m_pRecordset_access->AddNew();
for (int i = 0; i < m_pRecordset_sql->Fields->Count; i++)
{
vValue = m_pRecordset_sql->GetCollect(_variant_t((long)i));
m_pRecordset_access->PutCollect(_variant_t((long)i), vValue);
}
m_pRecordset_access->Update();
m_pRecordset_sql->MoveNext();
}