how to order records in ACCESS by MFC objects like CDaodatabase or CDaoRecordset?
table with primary key already set-down in ACCESS. when insert records into the table by Execute() function of cdaodatabase, to some extense, the records are not put behind the last record as wished, otherwise randomly into other places!
now i want to do some kind of operation to order the table after insertion by cdaodatabase or some others. how to?
Re: how to order records in ACCESS by MFC objects like CDaodatabase or CDaoRecordset?
in CDaoRecordset, with m_strSort member i can get the order records. but nothing changes in table! the code as follows,
table aa: ind as the primary key
ret.m_strSort = _T("[ind] DESC");
sql = _T("select * from aa");
// get the first record! with setting above surly the first record is (24 444)
// but nothing changes with table aa: records ordered ascently!!
sql.Format(_T("%d, %d"),var.lVal, var1.lVal);