|
Excuse me, how do you achieve the natural join of two tables in MFC (ODBC)?
When I connected the data source, three of the tables were selected, and only the following operations were done when displayed
void CStuInfView :: OnBtnShowAllData ()
{
// TODO: Add your control notification handler code here
int i = 0;
CString strTemp = "";
m_list.DeleteAllItems ();
m_pSet-> MoveFirst ();
while (! m_pSet-> IsEOF ())
{
m_list.InsertItem (i, m_pSet-> m_Student_Sno); m_list.SetItemText (i, 1, m_pSet-> m_Sname);
m_list.SetItemText (i, 2, m_pSet-> m_Ssex);
m_list.SetItemText (i, 3, m_pSet-> m_Cname);
m_list.SetItemText (i, 4, m_pSet-> m_SC_Cno);
strTemp.Format ("% ld", m_pSet-> m_Grade);
m_list.SetItemText (i, 5, strTemp);
strTemp.Format ("% ld", m_pSet-> m_Credit);
m_list.SetItemText (i, 6, strTemp);
i ++;
m_pSet-> MoveNext ();
Ranch
}
} |
|