Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dealing with Large Amounts of Data
Message
Information générale
Forum:
ASP.NET
Catégorie:
Conception classe
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01330296
Message ID:
01330635
Vues:
23
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform