Re: ADO Recordset::sort help
Quote:
Originally posted by nalan
I have a disconnected ADO recordset, which I want sorted by more than one filed..
The follwoing is the sort i tried
m_qData.getRecordsetPtr()->Sort = L"TagName,DateTime,wwVersion DESC";
This works but the problem I have is that the memory consumption increases drastically, with the number of records in the recordset, and I am talking of millions of rows.
On one occasion, all my memory was used up and ADO produced an exception.
What alternatives do I have. SQL server sorting is better, and does not eat memory, which means I have to dump the Recordset into a sql server table , sort it and then get it back into the recordset..
Any suggestions??
SQL sorting does use memory and tempdb space to sort the data. Just happens on the server and SQL may already have the memory allocated. Large disconnected recordsets are not usually a good idea unless you have the resources to cover them.