xiaobin_hlj80

https://blog.csdn.net/xiaobin_HLJ80 http://blog.chinaunix.net/uid/31552151.html

导航

ODBC4 - MFC

  • ODBC: 10.0.17763.1
  • SQL Server 2000 is deployed on Windows Server 2003 R2 running in VirtualBox

Setting ODBC

odbc1-sql2k0

odbc2-sql2k0

odbc3a-sql2k0

odbc3b-sql2k0

odbc3c-sql2k0

odbc3d-sql2k0

odbc3e-sql2k0

odbc3f-sql2k0

odbc3g-sql2k0

odbc4-sql2k0

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

Create SDI Application

app_wizard-rec_demo

add_class-rec_demo

add_variable-rec_demo

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));
}

posted on 2026-09-28 05:50  xiaobin80  阅读(9)  评论(0)    收藏  举报