Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dealing with Large Amounts of Data
Message
General information
Forum:
ASP.NET
Category:
Class design
Environment versions
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01330296
Message ID:
01330635
Views:
24
This message has been marked as a message which has helped to the initial question of the thread.
>>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:
// using System.IO;

DataSet ds = new DataSet();
StringReader reader = new StringReader(xml);
ds.ReadXml(reader);
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform