Hi,
I am working on a project which does not use a Database as backend. Instead
it uses a Disconnected Recordset to store and Manipulate Data.
With rs
Set .ActiveConnection = Nothing
.CursorLocation = adUseClient
.LockType = adLockBatchOptimistic
With .Fields
.Append "MDate", adDBDate
.Append "From", adBSTR
.Append "To", adBSTR
.Append "TotalCount", adInteger
End With
End With
After Necessary Processing the data is saved in XML Format.
rs.save App.Path & "\Data.xml"
But before saving i need to generate a report. I am trying to do this by
Set rs2 = New ADODB.Recordset
rs2.CursorLocation = adUseClient
rs.Filter = "mdate >= '" & dtpFrom.Value & "' and mdate <='" & dtpTo.Value &
"'"
Set rs2 = rs
rs2.Sort = "MDate,from"
rs.Filter = adFilterNone
But each time i try to generate the report it produces an error:
-2147217824 (80040e60)
Sort order cannot be applied
Can anyone Please help me out.
Regards,
Sanjeev K. B