>>Another approach I tested ( for large tables, 800k or so ) was to have a reference record and to get records with + / - offset (let say 50 before and 50 after reference record ) Then you will need new records from server only when you're out of "view". This worked well for randomly sorting criteria and huge tables. I think that is not needed for VFP backend.
>
That's pretty much what I'm doing - I have a VFP method which takes a starting record # and an offset. Then I grab the range of records (create a dummy cursor using the structure of the original), then loop through using SCATTER/INSERT INTO to build the new cursor. Then I use the XMLAdapter from VFP to convert it into a dataset that can be deserialized on the server side, ex.:
loXML = CREATEOBJECT("XMLAdapter")
loXML.UTF8Encoding = .T.
loXML.WrapMemoInCDATA = .T.
loXML.AddTableSchema("curDummy")
loXML.ToXML("lcResult")
RETURN lcResult
You do have to handle things like empty dates (which .NET chokes on) - either as NULLs or set them to something like 1/1/1900.
On the server, the code looks like:
DataSet ds = new DataSet();
StringReader reader = new StringReader(xml);
ds.ReadXml(reader);