I'm developing an application with big database content. Submitting unreasonable query criteria may result in a long database query time. How to stop the query when I got the interrupt message.
CString strSQL;
strSQL.Format("select * from studylevel where studydatetime between '2003-07-01 00:00:00.000' and '2003-09-01 23:59:59.999'"
CCSMDPatStuSerSet rsPatStuSerSet(m_dbPacsDB);
/////The program hang in here.....
rsStudyLevelSet.Open(AFX_DB_USE_DEFAULT_TYPE,strSQL,CRecordset::none);
while(!rsStudyLevelSet.IsEOF())
{
.....
rsStudyLevelSet.MoveNext();
}
rsStudyLevelSet.Close();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Recordset could not be closed when it's processing the querying job.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.