ODBC4 - MFC
- ODBC: 10.0.17763.1
- SQL Server 2000 is deployed on Windows Server 2003 R2 running in VirtualBox
Setting ODBC










Note: The ODBC driver in Windows 10 21H2 can no longer connect to SQL Server 2000.
Create SDI Application



data move
show data
After positioning the recordset, display the data for the current row:
void CMFCApplication1View::ShowRow()
{
int nItem;
CString tmp;
tmp.Format(_T("%d"), m_pSet->m_qty);
m_ListCtrl.DeleteAllItems();
nItem = m_ListCtrl.InsertItem(0, CString(m_pSet->m_stor_id));
m_ListCtrl.SetItemText(nItem, 1, CString(m_pSet->m_ord_num));
m_ListCtrl.SetItemText(nItem, 2, m_pSet->m_ord_date.Format("%Y-%m-%d"));
m_ListCtrl.SetItemText(nItem, 3, tmp);
m_ListCtrl.SetItemText(nItem, 4, CString(m_pSet->m_payterms));
m_ListCtrl.SetItemText(nItem, 5, CString(m_pSet->m_title_id));
}
浙公网安备 33010602011771号