I have just spent two hours trying to sort a disconnected recordset.
Filter works fine. Sort sez: Sort order cannot be applied.
Searched the Web - many people with the problem, none with a fix.
Got suspicious when one guy said he could sort an Integer field but not
String.
Searched Groups Google - same.
Showed the Groups "similar messages suppressed" thinggy, and
FOUND THE ANSWER!. In a Borland Delphi newsgroup!
In : borland.public.delphi.database.ado on: 2001-08-07
You are trying to sort on a column of a Variant type which is obviously not
possible. Try this:
NewRecordSet.Fields.Append('Surname', adVarChar, 100, adFldUpdatable);
NewRecordSet.Fields.Append('FirstName', adVarChar, 100, adFldUpdatable);
WOW!. Changed my adBSTR to adVarChar AND IT SORTS
NB
Const adVarChar = 200
Many thanks to Vassil!