| |

VerySource

 Forgot password?
 Register
Search
View: 633|Reply: 0

About Natural Connection

[Copy link]

4

Threads

8

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-1-3 14:00:01
| Show all posts |Read mode
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
}
}
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list