I have a C++ MDI application using MFC with SQLServer. The sql query is complex and takes approximately 20 sec to complete. This freezes the application and the user can't do any thing in the other child windows. I would like to know what should be done to allow the user to continue on the other Child windows while the sql query retrieves its information.
A snip of my code:
m_db.OpenEx("DSN=MYsql;Description=test;APP=Microsoft\x00ae Visual Studio .NET;WSID=TEST;DATABASE=myDB;Trusted_Connection=Yes");
class CMyRecView : public CRecordView
rs.Open(CRecordset::snapshot, "SELECT * FROM tblLeaders", CRecordset::readOnly | CRecordset::useMultiRowFetch);